v4.0.0 to dev #168

Merged
profitroll merged 3 commits from overhaul-v4 into dev 2024-12-26 19:44:57 +02:00
Showing only changes of commit 0ce4ddcf7c - Show all commits

View File

@ -173,7 +173,7 @@ class PyroClient(Client):
)
logger.info(
"Bot's info for the locale %s has been updated",
self.code,
code,
)
except KeyError:
logger.warning(
@ -309,7 +309,9 @@ class PyroClient(Client):
# This part here looks into the handlers and looks for commands
# in it, if there are any. Then adds them to self.commands
for handler in self.dispatcher.groups[0]:
if isinstance(handler, MessageHandler):
if isinstance(handler, MessageHandler) and (
hasattr(handler.filters, "base") or hasattr(handler.filters, "other")
):
for entry in [handler.filters.base, handler.filters.other]:
if hasattr(entry, "commands"):
for command in entry.commands: