pyTelegramBotAPI/examples/skip_updates_example.py

14 lines
358 B
Python
Raw Permalink Normal View History

2021-08-15 10:40:13 +03:00
import telebot
2021-08-16 21:03:17 +03:00
bot = telebot.TeleBot("TOKEN")
2021-08-15 10:40:13 +03:00
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
bot.reply_to(message, "Howdy, how are you doing?")
@bot.message_handler(func=lambda message: True)
def echo_all(message):
bot.reply_to(message, message.text)
2021-09-28 19:17:09 +03:00
bot.infinity_polling(skip_pending=True)# Skip pending skips old updates