MasterGroosha / telegram-report-bot

A simple bot to handle reports from users in your chat
MIT License
110 stars 23 forks source link

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

Closed MasterGroosha closed 2 years ago

MasterGroosha commented 3 years ago

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 commented 2 years ago

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