diff options
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 17 |
1 files changed, 17 insertions, 0 deletions
| @@ -0,0 +1,17 @@ | |||
| 1 | from aiogram import executor, types as t, Dispatcher | ||
| 2 | from shared.instances import dp, bot | ||
| 3 | import logging | ||
| 4 | |||
| 5 | logging.basicConfig(level=logging.INFO) | ||
| 6 | |||
| 7 | |||
| 8 | async def on_start(dp: Dispatcher): | ||
| 9 | from shared.commands import commands | ||
| 10 | for scope, cmd in commands.items(): | ||
| 11 | await bot.set_my_commands(cmd, scope) | ||
| 12 | |||
| 13 | if __name__ == '__main__': | ||
| 14 | import handlers | ||
| 15 | executor.start_polling( | ||
| 16 | dp, allowed_updates=t.AllowedUpdates.all(), on_startup=on_start | ||
| 17 | ) | ||
