File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77This repo adds integration between your aiogram application and taskiq.
88
9- It runs all startup and shutdown events of your application and adds 3 dependencies,
9+ It runs all startup and shutdown events of your application and adds 2 dependencies,
1010that you can use in your tasks.
1111
12- 1 . Executor - your executor;
13- 2 . Dispatcher - that were used along with executor;
14- 3 . Bot - your bot instance.
12+ 1 . Dispatcher - that were used along with executor;
13+ 2 . Bot - your bot instance.
1514
1615## Usage
1716
18- Add an executor to your main file and make it possible to available for import .
19- By default AioGram hides the way it creates executor, but since we want to use
20- startup and shutdown events, you have to manually define your executor .
17+ Define startup and shutdown events for your dispatcher .
18+ We use events, because we need to identify what your bot
19+ wants to do on startup and shutdown .
2120
22- For example:
21+ Also, it's useful for bot developers to distinct buisness logic
22+ from startup of the bot.
23+
24+ Below you'll find an example, how to integrate taskiq with your favorite
25+ bot framework.
2326
2427``` python
2528import asyncio
You can’t perform that action at this time.
0 commit comments