From 2d9912cea719dbdcdd62233d585a617da35f6dc6 Mon Sep 17 00:00:00 2001 From: Michael H Date: Thu, 13 Dec 2018 12:38:03 -0500 Subject: [PATCH] prevent locking out owner (#2317) --- redbot/core/commands/requires.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/redbot/core/commands/requires.py b/redbot/core/commands/requires.py index ab5dca108..911e3243d 100644 --- a/redbot/core/commands/requires.py +++ b/redbot/core/commands/requires.py @@ -420,9 +420,13 @@ class Requires: """ await self._verify_bot(ctx) - # Owner-only commands are non-overrideable + + # Owner should never be locked out of commands for user permissions. + if await ctx.bot.is_owner(ctx.author): + return True + # Owner-only commands are non-overrideable, and we already checked for owner. if self.privilege_level is PrivilegeLevel.BOT_OWNER: - return await ctx.bot.is_owner(ctx.author) + return False hook_result = await ctx.bot.verify_permissions_hooks(ctx) if hook_result is not None: