mirror of
https://github.com/catspace-dev/unicheckbot.git
synced 2024-11-25 23:33:44 +03:00
Добавил базовые handlers
This commit is contained in:
parent
12da4c2aab
commit
0cb6729e0c
1
apps/tgbot/handlers/__init__.py
Normal file
1
apps/tgbot/handlers/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
from . import default
|
6
apps/tgbot/handlers/default/__init__.py
Normal file
6
apps/tgbot/handlers/default/__init__.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
from aiogram import Dispatcher
|
||||||
|
|
||||||
|
from .start import start_cmd
|
||||||
|
|
||||||
|
def setup(dp: Dispatcher):
|
||||||
|
dp.register_message_handler(start_cmd, commands=['start'])
|
7
apps/tgbot/handlers/default/start.py
Normal file
7
apps/tgbot/handlers/default/start.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
from aiogram.types import Message
|
||||||
|
from loguru import logger
|
||||||
|
|
||||||
|
|
||||||
|
async def start_cmd(msg: Message):
|
||||||
|
logger.info(f"{msg.from_user.full_name} send /start")
|
||||||
|
await msg.answer("Basic reply")
|
Loading…
Reference in New Issue
Block a user