From 0ce4ddcf7c27725a767b3d78b5b989e4cdfd0da6 Mon Sep 17 00:00:00 2001 From: profitroll Date: Thu, 26 Dec 2024 18:37:55 +0100 Subject: [PATCH] Fixed two broken references --- src/libbot/pyrogram/classes/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libbot/pyrogram/classes/client.py b/src/libbot/pyrogram/classes/client.py index 7c2c349..0e8a204 100644 --- a/src/libbot/pyrogram/classes/client.py +++ b/src/libbot/pyrogram/classes/client.py @@ -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: