diff options
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(), |
