quackamollie.core.bot.quackamollie_bot module¶
Module to define commands, handle additional configuration and start the bot
- async quackamollie.core.bot.quackamollie_bot.start_quackamollie_bot(settings: QuackamollieSettings, bot: Bot, dispatcher: Dispatcher, commands: List[BotCommand], engine: AsyncEngine, async_session: async_sessionmaker[AsyncSession])[source]¶
Start the Quackamollie Telegram bot and close the database engine after polling ends
- Parameters:
settings (QuackamollieSettings) – Quackamollie settings to pass between commands of quackamollie
bot (Bot) – The Telegram bot already initialized with token
dispatcher (Dispatcher) – The aiogram dispatcher for messages and Telegram commands
commands (List[BotCommand]) – The list of the Bot commands
engine (AsyncEngine) – Database engine to dispose when the bot is stopped
async_session (async_sessionmaker[AsyncSession]) – Database asynchronous session maker