D
D
Dream2021-10-08 10:45:29
Telegram
Dream, 2021-10-08 10:45:29

How to split code into files in aiogram?

Is it possible and how to split the code into files? Discord.py has cogs for example. And in aiogram?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
LXSTVAYNE, 2021-10-08
@dreameddd

You can write functions, and then connect them via register_message_handler. So, for example, the dialog system connects nicely if fsm is used.
Here is an example EXAMPLE

V
Vova Sodal, 2021-10-10
@Vova666

You can write functions, and then connect them via register_message_handler.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question