1
0
Fork 0
mirror of synced 2024-05-19 12:02:29 +12:00

Fix how to check owner commands

This commit is contained in:
Dan Hess 2020-11-19 15:08:56 -06:00
parent c76e4eecfb
commit 05e2b10c8e

View file

@ -514,10 +514,8 @@ WHERE
# Loop through and check if there is a check called is_owner # Loop through and check if there is a check called is_owner
# If we loop through and don't find one, this means that the only other choice is to be # If we loop through and don't find one, this means that the only other choice is to be
# Able to manage the server (for the utils on perm commands) # Able to manage the server (for the utils on perm commands)
for func in cmd.checks: if cmd.cog.cog_check and cmd.cog.__cog_name__ == "Owner":
if "is_owner" in func.__qualname__: return await ctx.send("You need to own the bot to run this command")
await ctx.send("You need to own the bot to run this command")
return
await ctx.send( await ctx.send(
"You are required to have `manage_guild` permissions to run `{}`".format( "You are required to have `manage_guild` permissions to run `{}`".format(
cmd.qualified_name cmd.qualified_name