Skip to content

Commit 37713fb

Browse files
committed
Enforce embed field limits
1 parent 76dd6a9 commit 37713fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cogs/utility.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ async def send_group_help(self, group):
131131
description=self.process_help_msg(group.help),
132132
)
133133

134-
embed.add_field(name="Permission level", value=perm_level, inline=False)
134+
if perm_level:
135+
embed.add_field(name="Permission level", value=perm_level, inline=False)
136+
135137
format_ = ""
136138
length = len(group.commands)
137139

@@ -146,7 +148,7 @@ async def send_group_help(self, group):
146148
branch = "├─"
147149
format_ += f"`{branch} {command.name}` - {command.short_doc}\n"
148150

149-
embed.add_field(name="Sub Commands", value=format_, inline=False)
151+
embed.add_field(name="Sub Commands", value=format_[:1024], inline=False)
150152
embed.set_footer(
151153
text=f'Type "{self.clean_prefix}{self.command_attrs["name"]} command" '
152154
"for more info on a command."

0 commit comments

Comments
 (0)