diff options
| author | Igor Tolmachov <me@igorek.dev> | 2022-12-03 02:03:05 +0900 |
|---|---|---|
| committer | Igor Tolmachov <me@igorek.dev> | 2022-12-03 02:03:05 +0900 |
| commit | 70becfc32ec98084067686bd456971a4cb76082c (patch) | |
| tree | 87e426a5e5bfa789a750665707046e3ddc1a8c73 /main.py | |
| parent | 7f9e3d0055b3f659f3b5337b1a69418cc1fae72f (diff) | |
| download | karpov_ai_bot-70becfc32ec98084067686bd456971a4cb76082c.tar.gz karpov_ai_bot-70becfc32ec98084067686bd456971a4cb76082c.zip | |
Beta 2.0
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -6,7 +6,7 @@ from aiogram import types as t | |||
| 6 | logging.basicConfig(level=logging.INFO) | 6 | logging.basicConfig(level=logging.INFO) |
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | async def on_start(dp: Dispatcher): | 9 | async def on_start(dp: Dispatcher) -> None: |
| 10 | from shared.commands import commands | 10 | from shared.commands import commands |
| 11 | 11 | ||
| 12 | for scope, cmd in commands.items(): | 12 | for scope, cmd in commands.items(): |
| @@ -18,6 +18,7 @@ if __name__ == "__main__": | |||
| 18 | import handlers | 18 | import handlers |
| 19 | from shared.instances import dp | 19 | from shared.instances import dp |
| 20 | 20 | ||
| 21 | dp.middleware.setup(handlers.middleware.MessageMiddleware()) | ||
| 21 | executor.start_polling( | 22 | executor.start_polling( |
| 22 | dp, | 23 | dp, |
| 23 | allowed_updates=t.AllowedUpdates.all(), | 24 | allowed_updates=t.AllowedUpdates.all(), |
