From ab0a72b660ad84ef70cf84cc2bcb3d6e8b0ca761 Mon Sep 17 00:00:00 2001 From: Kingston-SCYD Date: Sun, 16 Aug 2026 23:01:04 -0500 Subject: [PATCH] Debug: add reaction indicators to trace on_message --- assistant/assistant.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/assistant/assistant.py b/assistant/assistant.py index bc26778..a80e687 100644 --- a/assistant/assistant.py +++ b/assistant/assistant.py @@ -71,21 +71,31 @@ class Assistant(commands.Cog): if message.author.bot: return if not isinstance(message.channel, discord.TextChannel): - log.debug("Not a TextChannel: %s", type(message.channel)) return guild = message.guild if guild is None: return + # Debug: react with 1️⃣ to confirm listener fires + if self.bot.user in message.mentions: + try: + await message.add_reaction("1️⃣") + except Exception: + pass + enabled = await self.config.guild(guild).enabled() if not enabled: - log.debug("Assistant disabled for guild %s", guild.id) return api_key = await self.config.api_key() if not api_key: - log.debug("No API key set") + # Debug: react with 🔑 if no API key + if self.bot.user in message.mentions: + try: + await message.add_reaction("🔑") + except Exception: + pass return chat_channel_id = await self.config.guild(guild).chat_channel() @@ -94,8 +104,6 @@ class Assistant(commands.Cog): is_chat_channel = chat_channel_id and message.channel.id == chat_channel_id is_ping = self.bot.user in message.mentions - log.debug("is_chat_channel=%s, is_ping=%s, mentions=%s", is_chat_channel, is_ping, message.mentions) - if not is_chat_channel and not is_ping: return