Consider changing this condition
|
if not (bool(user_id) ^ bool(username)): |
to something like
if (user_id is None) == (username is None):
To avoid throwing the ValueError "One and only one of user_id or username must be used" when an empty list of user_ids or usernames is issued.
Similarly for Filters.chat.
PS This should also be 3 to 4 times faster.
Consider changing this condition
python-telegram-bot/telegram/ext/filters.py
Line 796 in 88eccc6
to something like
To avoid throwing the
ValueError"One and only one of user_id or username must be used" when an empty list ofuser_ids orusernames is issued.Similarly for
Filters.chat.PS This should also be 3 to 4 times faster.