Debug: use log.info for visible console output
This commit is contained in:
+6
-10
@@ -75,25 +75,19 @@ class Assistant(commands.Cog):
|
||||
|
||||
guild = message.guild
|
||||
|
||||
# Debug: react with 1️⃣ to confirm listener fires
|
||||
if self.bot.user in message.mentions:
|
||||
try:
|
||||
await message.add_reaction("1️⃣")
|
||||
except Exception:
|
||||
pass
|
||||
log.info("[ASSISTANT DEBUG] Mention detected from %s in #%s", message.author, message.channel)
|
||||
|
||||
enabled = await self.config.guild(guild).enabled()
|
||||
if not enabled:
|
||||
if self.bot.user in message.mentions:
|
||||
log.info("[ASSISTANT DEBUG] Guild %s is disabled", guild.id)
|
||||
return
|
||||
|
||||
api_key = await self.config.api_key()
|
||||
if not api_key:
|
||||
# Debug: react with 🔑 if no API key
|
||||
if self.bot.user in message.mentions:
|
||||
try:
|
||||
await message.add_reaction("🔑")
|
||||
except Exception:
|
||||
pass
|
||||
log.info("[ASSISTANT DEBUG] No API key set")
|
||||
return
|
||||
|
||||
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:
|
||||
return
|
||||
|
||||
log.info("[ASSISTANT DEBUG] Processing message, is_ping=%s, is_chat_channel=%s", is_ping, is_chat_channel)
|
||||
|
||||
content = message.content
|
||||
if is_ping:
|
||||
for mention in (f"<@{self.bot.user.id}>", f"<@!{self.bot.user.id}>"):
|
||||
|
||||
Reference in New Issue
Block a user