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
1 changed files with 2 additions and 3 deletions

View File

@ -1,8 +1,7 @@
# 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 CancelUpdate
bot = AsyncTeleBot('TOKEN')
@ -36,4 +35,4 @@ async def start(message):
await bot.send_message(message.chat.id, 'Hello!')
import asyncio
asyncio.run(bot.polling())
asyncio.run(bot.polling())