Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move "config" and "lang" to bot properties instead of middleware #4

Closed
MasterGroosha opened this issue May 18, 2021 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@MasterGroosha
Copy link
Owner

As noted by aiogram maintainer, one can add custom properties which are meant to be constant (like config or lang) directly to Bot instance.
Currently these two properties are pushed to every new update in middleware, which is not performance-wise.

This way, the only middleware can be easily removed, simplifying the code a bit.

@MasterGroosha MasterGroosha added the enhancement New feature or request label May 18, 2021
@MasterGroosha MasterGroosha self-assigned this May 18, 2021
@MasterGroosha
Copy link
Owner Author

Fixed in aiogram3 branch, will be merged with master in future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant