mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[Owner] Laxer checks in [p]command disable
This will allow to disable the non-owner restricted commands of the owner cog
This commit is contained in:
parent
e3815b0264
commit
bf063f55fc
@ -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,7 +381,8 @@ class Owner:
|
||||
comm_obj = comm_obj.commands[cmd]
|
||||
except KeyError:
|
||||
return KeyError
|
||||
if comm_obj.cog_name == "Owner":
|
||||
for check in comm_obj.checks:
|
||||
if check.__name__ == "is_owner_check":
|
||||
return False
|
||||
return comm_obj
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user