add new func in voice bot

This commit is contained in:
Andrey
2024-11-17 00:50:55 +03:00
parent 502c07a2c9
commit e0e0a6de51
8 changed files with 229 additions and 68 deletions

View File

@@ -3,6 +3,7 @@ from aiogram.client.default import DefaultBotProperties
from aiogram.fsm.storage.memory import MemoryStorage
from aiogram.fsm.strategy import FSMStrategy
from voice_bot.handlers.callback_handler import callback_router
from voice_bot.handlers.voice_handler import voice_router
@@ -13,6 +14,6 @@ async def start_bot(bdf):
link_preview_is_disabled=bdf.settings['Telegram']['preview_link']
))
dp = Dispatcher(storage=MemoryStorage(), fsm_strategy=FSMStrategy.GLOBAL_USER)
dp.include_routers(voice_router)
dp.include_routers(voice_router, callback_router)
await bot.delete_webhook(drop_pending_updates=True)
await dp.start_polling(bot, skip_updates=True)