mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2025-09-11 13:00:40 +03:00
add message 1 and message 2 with logs to check
This commit is contained in:
parent
55f516b21b
commit
8cd466fc91
@ -5,6 +5,8 @@ from aiogram.contrib.middlewares.logging import LoggingMiddleware
|
||||
from aiogram.dispatcher import Dispatcher
|
||||
from aiogram.dispatcher.webhook import SendMessage
|
||||
from aiogram.utils.callback_data import CallbackData
|
||||
|
||||
from app.core.logger import logger
|
||||
from core.parse_web import configure_firefox_driver, download_gecko_driver, parse_site
|
||||
from settings import API_TOKEN
|
||||
|
||||
@ -35,6 +37,24 @@ def get_keyboard() -> types.InlineKeyboardMarkup:
|
||||
return markup
|
||||
|
||||
|
||||
@dispatcher.message_handler(commands=['command1'])
|
||||
async def chat_id(message: types.Message) -> None:
|
||||
|
||||
logger.info("command 1 started")
|
||||
await asyncio.sleep(15)
|
||||
await bot.send_message(message.chat.id, 'message 1 on screen')
|
||||
logger.info('command 1 ends')
|
||||
|
||||
|
||||
@dispatcher.message_handler(commands=['command2'])
|
||||
async def chat_id(message: types.Message) -> None:
|
||||
|
||||
logger.info("command 2 started")
|
||||
await asyncio.sleep(15)
|
||||
await bot.send_message(message.chat.id, 'message 2 on screen')
|
||||
logger.info('command 2 ends')
|
||||
|
||||
|
||||
@dispatcher.callback_query_handler(stations_cb.filter(direction='home->office'))
|
||||
async def home_office(
|
||||
query: types.CallbackQuery, callback_data: dict[str, str]
|
||||
|
0
app/tests/data/__init__.py
Normal file
0
app/tests/data/__init__.py
Normal file
Loading…
x
Reference in New Issue
Block a user