Skip to content

Commit 23d66af

Browse files
authored
Merge pull request eternnoir#381 from noirgif/master
change the documentation of TeleBot.polling in readme
2 parents c91ce60 + ed29f93 commit 23d66af

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ tb = telebot.TeleBot(TOKEN) #create a new Telegram Bot object
234234
# - none_stop: True/False (default False) - Don't stop polling when receiving an error from the Telegram servers
235235
# - interval: True/False (default False) - The interval between polling requests
236236
# Note: Editing this parameter harms the bot's response time
237-
# - block: True/False (default True) - Blocks upon calling this function
238-
tb.polling(none_stop=False, interval=0, block=True)
237+
# - timeout: integer (default 20) - Timeout in seconds for long polling.
238+
tb.polling(none_stop=False, interval=0, timeout=20)
239239

240240
# getMe
241241
user = tb.get_me()

‎README.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,8 @@ TeleBot
421421
# - none_stop: True/False (default False) - Don't stop polling when receiving an error from the Telegram servers
422422
# - interval: True/False (default False) - The interval between polling requests
423423
# Note: Editing this parameter harms the bot's response time
424-
# - block: True/False (default True) - Blocks upon calling this function
425-
tb.polling(none_stop=False, interval=0, block=True)
424+
# - timeout: integer (default 20) - Timeout in seconds for long polling.
425+
tb.polling(none_stop=False, interval=0, timeout=20)
426426
427427
# getMe
428428
user = tb.get_me()

0 commit comments

Comments
 (0)