From 3e7da0fd1825fdac5783f1dfeb8b080d81b778b5 Mon Sep 17 00:00:00 2001 From: _run Date: Mon, 16 Aug 2021 14:49:45 +0400 Subject: [PATCH] Update skip_updates_example.py --- examples/skip_updates_example.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/skip_updates_example.py b/examples/skip_updates_example.py index 8474e16..805c9e4 100644 --- a/examples/skip_updates_example.py +++ b/examples/skip_updates_example.py @@ -1,6 +1,6 @@ import telebot -bot = telebot.TeleBot("TOKEN") +bot = telebot.TeleBot("TOKEN",skip_pending=True)# Skip pending skips old updates @bot.message_handler(commands=['start', 'help']) def send_welcome(message): @@ -10,6 +10,4 @@ def send_welcome(message): def echo_all(message): bot.reply_to(message, message.text) -bot.polling(skip_updates=True) # Will skip old messages when skip_updates is set - -# Also, you can use skip_updates in infinity_polling() \ No newline at end of file +bot.polling() \ No newline at end of file