From bf063f55fc70ef4ec02879dbac19c48691cc7365 Mon Sep 17 00:00:00 2001 From: Twentysix Date: Sun, 28 Aug 2016 07:22:37 +0200 Subject: [PATCH] [Owner] Laxer checks in [p]command disable This will allow to disable the non-owner restricted commands of the owner cog --- cogs/owner.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cogs/owner.py b/cogs/owner.py index f7dfbee63..4f69570dc 100644 --- a/cogs/owner.py +++ b/cogs/owner.py @@ -346,7 +346,7 @@ class Owner: if comm_obj is KeyError: await self.bot.say("That command doesn't seem to exist.") elif comm_obj is False: - await self.bot.say("You cannot disable the commands of the owner cog.") + await self.bot.say("You cannot disable owner restricted commands.") else: comm_obj.enabled = False comm_obj.hidden = True @@ -381,8 +381,9 @@ class Owner: comm_obj = comm_obj.commands[cmd] except KeyError: return KeyError - if comm_obj.cog_name == "Owner": - return False + for check in comm_obj.checks: + if check.__name__ == "is_owner_check": + return False return comm_obj async def disable_commands(self): # runs at boot