mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-19 20:03:17 +12:00
remove disabling dm commands
This commit is contained in:
parent
58cc9970fc
commit
4a5aac2cd6
|
@ -27,6 +27,8 @@ class Disable(commands.Cog):
|
|||
self.bot.remove_before_invoke_hook(self.disabler)
|
||||
|
||||
async def disabler(self, ctx):
|
||||
if isinstance(ctx.channel, discord.DMChannel):
|
||||
return
|
||||
if await self.config.guild(ctx.guild).disabled() and not await is_admin_or_superior(self.bot, ctx.author):
|
||||
raise DisabledError(f"Command {ctx.command.name} is disabled in {ctx.guild.name}.")
|
||||
|
||||
|
|
Loading…
Reference in a new issue