Skip to content

Commit 20cbc08

Browse files
committed
Fix external plugin crashing help cmd bug
1 parent d6eb0e7 commit 20cbc08

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cogs/utility.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ async def format_cog_help(self, ctx, cog):
3939
prefix = self.bot.prefix
4040

4141
def perms_required(cmd):
42-
return next(getattr(c, 'permission_level', 0) for c in cmd.checks)
42+
for c in cmd.checks:
43+
return getattr(c, 'permission_level', 0)
44+
return 0
4345

4446
fmts = ['']
4547
for cmd in sorted(self.bot.commands,

0 commit comments

Comments
 (0)