Debug: use log.info for visible console output

This commit is contained in:
2026-08-16 23:04:25 -05:00
parent 3d5a207b13
commit 4028f8ef20
+6 -10
View File
@@ -75,25 +75,19 @@ class Assistant(commands.Cog):
guild = message.guild guild = message.guild
# Debug: react with 1️⃣ to confirm listener fires
if self.bot.user in message.mentions: if self.bot.user in message.mentions:
try: log.info("[ASSISTANT DEBUG] Mention detected from %s in #%s", message.author, message.channel)
await message.add_reaction("1️⃣")
except Exception:
pass
enabled = await self.config.guild(guild).enabled() enabled = await self.config.guild(guild).enabled()
if not enabled: if not enabled:
if self.bot.user in message.mentions:
log.info("[ASSISTANT DEBUG] Guild %s is disabled", guild.id)
return return
api_key = await self.config.api_key() api_key = await self.config.api_key()
if not api_key: if not api_key:
# Debug: react with 🔑 if no API key
if self.bot.user in message.mentions: if self.bot.user in message.mentions:
try: log.info("[ASSISTANT DEBUG] No API key set")
await message.add_reaction("🔑")
except Exception:
pass
return return
chat_channel_id = await self.config.guild(guild).chat_channel() chat_channel_id = await self.config.guild(guild).chat_channel()
@@ -105,6 +99,8 @@ class Assistant(commands.Cog):
if not is_chat_channel and not is_ping: if not is_chat_channel and not is_ping:
return return
log.info("[ASSISTANT DEBUG] Processing message, is_ping=%s, is_chat_channel=%s", is_ping, is_chat_channel)
content = message.content content = message.content
if is_ping: if is_ping:
for mention in (f"<@{self.bot.user.id}>", f"<@!{self.bot.user.id}>"): for mention in (f"<@{self.bot.user.id}>", f"<@!{self.bot.user.id}>"):