aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info/userInfo.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-06 20:28:04 +0200
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-07-06 20:28:04 +0200
commit22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b (patch)
treeab7f68cb9168d2b06ba144b48311370059cf5fac /src/commands/info/userInfo.ts
parent544f94704c9dd37913de11eab67cd594d17fcd87 (diff)
downloadtanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.gz
tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.bz2
tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.zip
remove array from add*(...)
Diffstat (limited to 'src/commands/info/userInfo.ts')
-rw-r--r--src/commands/info/userInfo.ts20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 73a0422..3479ea3 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -145,7 +145,7 @@ export default class UserInfoCommand extends BushCommand {
if (pronouns && typeof pronouns === 'string' && pronouns !== 'Unspecified') generalInfo.push(`**Pronouns:** ${pronouns}`);
- embed.addFields([{ name: title, value: generalInfo.join('\n') }]);
+ embed.addFields({ name: title, value: generalInfo.join('\n') });
}
public static generateServerInfoField(embed: EmbedBuilder, member?: GuildMember | undefined, title = '» Server Information') {
@@ -170,7 +170,7 @@ export default class UserInfoCommand extends BushCommand {
)
serverUserInfo.push(`**General Deletions:** ⅓`);
if (member?.nickname) serverUserInfo.push(`**Nickname:** ${escapeMarkdown(member?.nickname)}`);
- if (serverUserInfo.length) embed.addFields([{ name: title, value: serverUserInfo.join('\n') }]);
+ if (serverUserInfo.length) embed.addFields({ name: title, value: serverUserInfo.join('\n') });
}
public static generatePresenceField(embed: EmbedBuilder, member?: GuildMember | undefined, title = '» Presence') {
@@ -198,7 +198,7 @@ export default class UserInfoCommand extends BushCommand {
if (activitiesNames.length)
presenceInfo.push(`**Activit${activitiesNames.length - 1 ? 'ies' : 'y'}:** ${oxford(activitiesNames, 'and', '')}`);
if (customStatus && customStatus.length) presenceInfo.push(`**Custom Status:** ${escapeMarkdown(customStatus)}`);
- embed.addFields([{ name: title, value: presenceInfo.join('\n') }]);
+ embed.addFields({ name: title, value: presenceInfo.join('\n') });
enum statusEmojis {
online = '787550449435803658',
@@ -223,12 +223,10 @@ export default class UserInfoCommand extends BushCommand {
.map((role) => `${role}`);
const joined = roles.join(', ');
- embed.addFields([
- {
- name: `» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`,
- value: joined.length > 1024 ? 'Too Many Roles to Display' + '...' : joined
- }
- ]);
+ embed.addFields({
+ name: `» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`,
+ value: joined.length > 1024 ? 'Too Many Roles to Display' + '...' : joined
+ });
}
public static generatePermissionsField(
@@ -250,7 +248,7 @@ export default class UserInfoCommand extends BushCommand {
});
}
- if (perms.length) embed.addFields([{ name: title, value: perms.join(' ') }]);
+ if (perms.length) embed.addFields({ name: title, value: perms.join(' ') });
}
public static async generateBotField(embed: EmbedBuilder, user: User, title = '» Bot Information') {
@@ -290,6 +288,6 @@ export default class UserInfoCommand extends BushCommand {
);
}
- if (botInfo.length) embed.addFields([{ name: title, value: botInfo.join('\n') }]);
+ if (botInfo.length) embed.addFields({ name: title, value: botInfo.join('\n') });
}
}