From 4e37662ab3048128277a2f85c96bdeaead5c5386 Mon Sep 17 00:00:00 2001 From: coder2020official Date: Sun, 12 Sep 2021 00:30:56 +0500 Subject: [PATCH] upd --- examples/deep_linking.py | 3 ++- examples/echo_bot.py | 2 +- examples/inline_example.py | 2 +- examples/inline_keyboard_example.py | 2 +- examples/payments_example.py | 3 ++- examples/skip_updates_example.py | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/deep_linking.py b/examples/deep_linking.py index e0a7e94..f5ea506 100644 --- a/examples/deep_linking.py +++ b/examples/deep_linking.py @@ -73,4 +73,5 @@ def send_welcome(message): reply = "Please visit me via a provided URL from the website." bot.reply_to(message, reply) -bot.polling(skip_pending=True,non_stop=True) # Skip old updates + +bot.polling() diff --git a/examples/echo_bot.py b/examples/echo_bot.py index ec71f70..b66eb34 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(skip_pending=True,non_stop=True) # Skip old updates +bot.polling() diff --git a/examples/inline_example.py b/examples/inline_example.py index 8bb064d..21f05eb 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(skip_pending=True) # Skip old updates + bot.polling(True) while 1: time.sleep(3) diff --git a/examples/inline_keyboard_example.py b/examples/inline_keyboard_example.py index 56b2ae5..f2b3fce 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(skip_pending=True,non_stop=True) # Skip old updates +bot.polling(none_stop=True) diff --git a/examples/payments_example.py b/examples/payments_example.py index efdddaf..d0f52d4 100644 --- a/examples/payments_example.py +++ b/examples/payments_example.py @@ -78,4 +78,5 @@ def got_payment(message): parse_mode='Markdown') -bot.polling(skip_pending=True,non_stop=True) # Skip old updates +bot.skip_pending = True +bot.polling(none_stop=True, interval=0) diff --git a/examples/skip_updates_example.py b/examples/skip_updates_example.py index 01aa414..0bd631b 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,non_stop=True) # Skip old updates +bot.polling(skip_pending=True)# Skip pending skips old updates