diff --git a/gurt/listeners.py b/gurt/listeners.py index 84a14d7..36de9b0 100644 --- a/gurt/listeners.py +++ b/gurt/listeners.py @@ -294,6 +294,11 @@ async def on_message_listener(cog: "GurtCog", message: discord.Message): and message.reference.resolved.author == cog.bot.user ) gurt_in_message = "gurt" in message.content.lower() + + 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 + now = time.time() time_since_last_activity = now - cog.channel_activity.get(channel_id, 0) time_since_bot_spoke = now - cog.bot_last_spoke.get(channel_id, 0)