From bd8bd40863c64a9ea8e19559178245b44d3763c0 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 8 Jun 2023 08:47:56 +0200 Subject: [PATCH] Added reaction channel null check #318 --- kdb-bot/src/modules/base/helper/base_reaction_handler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kdb-bot/src/modules/base/helper/base_reaction_handler.py b/kdb-bot/src/modules/base/helper/base_reaction_handler.py index 9fb4f89e..a16c2cf4 100644 --- a/kdb-bot/src/modules/base/helper/base_reaction_handler.py +++ b/kdb-bot/src/modules/base/helper/base_reaction_handler.py @@ -47,6 +47,10 @@ class BaseReactionHandler: log_msg += f" with {payload.emoji.name}" try: channel = guild.get_channel(payload.channel_id) + if channel is None: + self._logger.warn(__name__, f"Channel not found") + return + message = await channel.fetch_message(payload.message_id) self._logger.info( __name__, -- 2.45.2