diff --git a/examples/custom_filters.py b/examples/custom_filters.py index 23cebe3..0294468 100644 --- a/examples/custom_filters.py +++ b/examples/custom_filters.py @@ -43,4 +43,4 @@ def bye_user(message): bot.add_custom_filter(MainFilter) bot.add_custom_filter(IsAdmin) -bot.polling(skip_pending=True) # Skip old updates \ No newline at end of file +bot.polling(skip_pending=True,non_stop=True) # Skip old updates \ No newline at end of file diff --git a/examples/deep_linking.py b/examples/deep_linking.py index f5ea506..e0a7e94 100644 --- a/examples/deep_linking.py +++ b/examples/deep_linking.py @@ -73,5 +73,4 @@ def send_welcome(message): reply = "Please visit me via a provided URL from the website." bot.reply_to(message, reply) - -bot.polling() +bot.polling(skip_pending=True,non_stop=True) # Skip old updates diff --git a/examples/echo_bot.py b/examples/echo_bot.py index b66eb34..ec71f70 100644 --- a/examples/echo_bot.py +++ b/examples/echo_bot.py @@ -25,4 +25,4 @@ def echo_message(message): bot.reply_to(message, message.text) -bot.polling() +bot.polling(skip_pending=True,non_stop=True) # Skip old updates diff --git a/examples/inline_example.py b/examples/inline_example.py index 21f05eb..8bb064d 100644 --- a/examples/inline_example.py +++ b/examples/inline_example.py @@ -61,7 +61,7 @@ def default_query(inline_query): def main_loop(): - bot.polling(True) + bot.polling(skip_pending=True) # Skip old updates while 1: time.sleep(3) diff --git a/examples/inline_keyboard_example.py b/examples/inline_keyboard_example.py index f2b3fce..56b2ae5 100644 --- a/examples/inline_keyboard_example.py +++ b/examples/inline_keyboard_example.py @@ -24,4 +24,4 @@ def callback_query(call): def message_handler(message): bot.send_message(message.chat.id, "Yes/no?", reply_markup=gen_markup()) -bot.polling(none_stop=True) +bot.polling(skip_pending=True,non_stop=True) # Skip old updates diff --git a/examples/payments_example.py b/examples/payments_example.py index d0f52d4..efdddaf 100644 --- a/examples/payments_example.py +++ b/examples/payments_example.py @@ -78,5 +78,4 @@ def got_payment(message): parse_mode='Markdown') -bot.skip_pending = True -bot.polling(none_stop=True, interval=0) +bot.polling(skip_pending=True,non_stop=True) # Skip old updates diff --git a/examples/skip_updates_example.py b/examples/skip_updates_example.py index 0bd631b..01aa414 100644 --- a/examples/skip_updates_example.py +++ b/examples/skip_updates_example.py @@ -10,4 +10,4 @@ def send_welcome(message): def echo_all(message): bot.reply_to(message, message.text) -bot.polling(skip_pending=True)# Skip pending skips old updates +bot.polling(skip_pending=True,non_stop=True) # Skip old updates