diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/info/userInfo.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index a09d8ca..4f11936 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -207,7 +207,12 @@ export default class UserInfoCommand extends BushCommand { .filter((role) => role.name !== '@everyone') .sort((role1, role2) => role2.position - role1.position) .map((role) => `${role}`); - embed.addFields({ name: `» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`, value: roles.join(', ') }); + + const joined = roles.join(', '); + embed.addFields({ + name: `» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`, + value: joined.length > 1024 ? 'Too Many Roles to Display' + '...' : joined + }); } private static generatePermissionsField(embed: Embed, member: BushGuildMember | undefined) { |