1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Update flooding_middleware.py

This commit is contained in:
_run 2022-03-07 17:23:55 +05:00 committed by GitHub
parent b292b275cb
commit 60a23665cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,7 @@
# Just a little example of middleware handlers # Just a little example of middleware handlers
from telebot.asyncio_handler_backends import BaseMiddleware from telebot.asyncio_handler_backends import BaseMiddleware, CancelUpdate
from telebot.async_telebot import AsyncTeleBot from telebot.async_telebot import AsyncTeleBot
from telebot.async_telebot import CancelUpdate
bot = AsyncTeleBot('TOKEN') bot = AsyncTeleBot('TOKEN')
@ -36,4 +35,4 @@ async def start(message):
await bot.send_message(message.chat.id, 'Hello!') await bot.send_message(message.chat.id, 'Hello!')
import asyncio import asyncio
asyncio.run(bot.polling()) asyncio.run(bot.polling())