fix(core): fix crash on DM message

This commit is contained in:
Romain J 2021-01-30 16:43:42 +01:00
parent 434021ecb9
commit f7176d917c

View file

@ -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