Skip to content

Commit f900a46

Browse files
committed
Change role limit to 1024 chars
And since @x is possible, which is less than '...', I needed to also change the syntax.
1 parent 0ef97d4 commit f900a46

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

core/thread.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def _format_info_embed(self, user, log_url, log_count, color):
676676
role_names = ''
677677
if member:
678678
sep_server = self.bot.using_multiple_server_setup
679-
seperator = ', ' if sep_server else ' '
679+
separator = ', ' if sep_server else ' '
680680

681681
roles = []
682682

@@ -687,12 +687,13 @@ def _format_info_embed(self, user, log_url, log_count, color):
687687
fmt = role.name if sep_server else role.mention
688688
roles.append(fmt)
689689

690-
if len(seperator.join(roles)) > 1000:
691-
roles.pop()
690+
if len(separator.join(roles)) > 1024:
692691
roles.append('...')
692+
while len(separator.join(roles)) > 1024:
693+
roles.pop(-2)
693694
break
694-
695-
role_names = seperator.join(roles)
695+
696+
role_names = separator.join(roles)
696697

697698
embed = discord.Embed(color=color,
698699
description=user.mention,

0 commit comments

Comments
 (0)