Moved handlers to telegram/handlers.py

This commit is contained in:
Alexey Sokolov
2022-08-12 00:58:26 +03:00
parent e759b69b86
commit d1425aaa8e
2 changed files with 14 additions and 5 deletions

11
telegram/handlers.py Normal file
View File

@@ -0,0 +1,11 @@
from aiogram import Dispatcher
from aiogram.dispatcher.webhook import SendMessage
from aiogram.types import Message
async def telegram_test(message: Message) -> SendMessage:
return SendMessage(message.chat.id, 'passed')
def register_handlers(dispatcher: Dispatcher):
dispatcher.register_message_handler(telegram_test, commands=['test'])