Disable AI in DMs for Gurt

This commit is contained in:
Slipstream 2025-06-09 17:18:45 +00:00
parent bd61f6d354
commit 8430b7e6a5
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -566,6 +566,11 @@ async def on_message_listener(cog: "GurtCog", message: discord.Message):
if not should_consider_responding: if not should_consider_responding:
return return
# If in DMs and triggered by a direct mention or reply, inform user and skip AI
if message.guild is None and (bot_mentioned or replied_to_bot or gurt_in_message):
await message.channel.send("AI functionality is disabled in DMs.")
return
# --- Call AI and Handle Response --- # --- Call AI and Handle Response ---
cog.current_channel = ( cog.current_channel = (
message.channel message.channel