dispatcher.add_handlers method #2813
Replies: 2 comments 6 replies
-
Hi. thinks for the suggestion. The first one seems reasonable to me 👍 @Poolitzer @harshil21 what do you think? Note that the second one can't work since e.g.
I'm not sure, tbh. That was added before my time at PTB … |
Beta Was this translation helpful? Give feedback.
-
The first one looks great, but why use One drawback is that people who are using only the default group will still have to write the |
Beta Was this translation helpful? Give feedback.
-
What you think about
dispatcher.add_handlers
method?For adding multiple handlers at once? It may increse perfomance and clarity a bit.
Here is differ implementations
For example look at this non optimal code from
dispatcher.add_handler
:BTW I still don't understand why need
self.groups
if we may iterate over aself.handlers
keysBeta Was this translation helpful? Give feedback.
All reactions