aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-03-06 12:09:48 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-03-06 12:09:48 -0500
commite49658752f07cbf15bf3e249d3d2be017f14105b (patch)
tree0ca473eb898cd47bded101b69ea5d5e719af2651 /src/commands
parent1947c715f5ff846316b2d921b78f1a71a2892d1b (diff)
downloadtanzanite-e49658752f07cbf15bf3e249d3d2be017f14105b.tar.gz
tanzanite-e49658752f07cbf15bf3e249d3d2be017f14105b.tar.bz2
tanzanite-e49658752f07cbf15bf3e249d3d2be017f14105b.zip
fix(UserInfoCommand): too many roles
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/info/userInfo.ts7
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) {