From f7176d917c41bcc890e76fc1845c9b8feaddd079 Mon Sep 17 00:00:00 2001 From: Romain J Date: Sat, 30 Jan 2021 16:43:42 +0100 Subject: [PATCH] fix(core): fix crash on DM message --- tuxbot/core/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuxbot/core/bot.py b/tuxbot/core/bot.py index 9712591..c48366a 100644 --- a/tuxbot/core/bot.py +++ b/tuxbot/core/bot.py @@ -253,7 +253,7 @@ class Tux(commands.AutoShardedBot): ctx: ContextPlus = await self.get_context(message) if ctx is not None and ctx.valid: - if ctx.command in search_for( + if message.guild and ctx.command in search_for( self.config.Servers, message.guild.id, "disabled_command", [] ): raise exceptions.DisabledCommandByServerOwner