From 05e2b10c8e0eb8b03d3d5cc8ed2ffa67d35d6e63 Mon Sep 17 00:00:00 2001 From: Dan Hess Date: Thu, 19 Nov 2020 15:08:56 -0600 Subject: [PATCH] Fix how to check owner commands --- cogs/admin.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cogs/admin.py b/cogs/admin.py index 73d0fa9..3d4555e 100644 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -514,10 +514,8 @@ WHERE # 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 # Able to manage the server (for the utils on perm commands) - for func in cmd.checks: - if "is_owner" in func.__qualname__: - await ctx.send("You need to own the bot to run this command") - return + if cmd.cog.cog_check and cmd.cog.__cog_name__ == "Owner": + return await ctx.send("You need to own the bot to run this command") await ctx.send( "You are required to have `manage_guild` permissions to run `{}`".format( cmd.qualified_name