From be52d33e5466f83fbf86d0bec3553f788bc08c27 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Fri, 24 Jul 2020 10:26:41 +0200 Subject: No need for all() in cog_check for AllowDenyLists. --- bot/cogs/allow_deny_lists.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bot/cogs/allow_deny_lists.py b/bot/cogs/allow_deny_lists.py index 71a032ea5..e28e32bd6 100644 --- a/bot/cogs/allow_deny_lists.py +++ b/bot/cogs/allow_deny_lists.py @@ -210,10 +210,7 @@ class AllowDenyLists(Cog): def cog_check(self, ctx: Context) -> bool: """Only allow moderators to invoke the commands in this cog.""" - checks = [ - with_role_check(ctx, *constants.MODERATION_ROLES), - ] - return all(checks) + return with_role_check(ctx, *constants.MODERATION_ROLES) def setup(bot: Bot) -> None: -- cgit v1.2.3