aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..d9dce7e
--- /dev/null
+++ b/main.py
@@ -0,0 +1,17 @@
1from aiogram import executor, types as t, Dispatcher
2from shared.instances import dp, bot
3import logging
4
5logging.basicConfig(level=logging.INFO)
6
7
8async 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
13if __name__ == '__main__':
14 import handlers
15 executor.start_polling(
16 dp, allowed_updates=t.AllowedUpdates.all(), on_startup=on_start
17 )