Skip to content

Commit da9d16b

Browse files
committed
Better formatting for perms in help cmd
1 parent 1898bcb commit da9d16b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cogs/utility.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def format_cog_help(self, ctx, cog):
4545
new_fmt = f'`{prefix + cmd.qualified_name}` '
4646
perm_level = next(getattr(c, 'permission_level', None) for c in cmd.checks)
4747
if perm_level is not None:
48-
new_fmt += f'[{perm_level}] '
48+
new_fmt = f'`[{perm_level}] {prefix + cmd.qualified_name}` '
4949

5050
new_fmt += f'- {cmd.short_doc}\n'
5151
if len(new_fmt) + len(fmts[-1]) >= 1024:
@@ -80,12 +80,15 @@ async def format_command_help(self, cmd):
8080
prefix = self.bot.prefix
8181

8282
perm_level = next(getattr(c, 'permission_level', None) for c in cmd.checks)
83-
perm_level = f' [{perm_level}]' if perm_level is not None else ''
83+
perm_level = f'**{perm_level.name}** [{perm_level}]' if perm_level is not None else ''
84+
8485
embed = Embed(
85-
title=f'`{prefix}{cmd.signature}`{perm_level}',
86+
title=f'`{prefix}{cmd.signature}`',
8687
color=self.bot.main_color,
8788
description=cmd.help
8889
)
90+
91+
embed.add_field(name='Permission level', value=perm_level)
8992

9093
if not isinstance(cmd, commands.Group):
9194
return embed

0 commit comments

Comments
 (0)