aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/info')
-rw-r--r--src/commands/info/botInfo.ts30
-rw-r--r--src/commands/info/color.ts8
-rw-r--r--src/commands/info/guildInfo.ts6
-rw-r--r--src/commands/info/help.ts10
-rw-r--r--src/commands/info/ping.ts8
-rw-r--r--src/commands/info/snowflake.ts12
-rw-r--r--src/commands/info/userInfo.ts12
7 files changed, 43 insertions, 43 deletions
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts
index d23f5b1..4d914e4 100644
--- a/src/commands/info/botInfo.ts
+++ b/src/commands/info/botInfo.ts
@@ -41,8 +41,8 @@ export default class BotInfoCommand extends BushCommand {
if (repoUrl.includes('.git')) repoUrl = repoUrl.substring(0, repoUrl.length - 4);
const embed = new Embed()
.setTitle('Bot Info:')
- .addField({ name: '**Uptime**', value: util.humanizeDuration(client.uptime!, 2), inline: true })
- .addField({
+ .addFields({ name: '**Uptime**', value: util.humanizeDuration(client.uptime!, 2), inline: true })
+ .addFields({
name: '**Memory Usage**',
value: `System: ${prettyBytes(os.totalmem() - os.freemem(), { binary: true })}/${prettyBytes(os.totalmem(), {
binary: true
@@ -52,23 +52,23 @@ export default class BotInfoCommand extends BushCommand {
)}`,
inline: true
})
- .addField({ name: '**CPU Usage**', value: `${client.stats.cpu}%`, inline: true })
- .addField({ name: '**Platform**', value: Platform[process.platform], inline: true })
- .addField({ name: '**Commands Used**', value: `${client.stats.commandsUsed.toLocaleString()}`, inline: true })
- .addField({ name: '**Servers**', value: client.guilds.cache.size.toLocaleString(), inline: true })
- .addField({ name: '**Users**', value: client.users.cache.size.toLocaleString(), inline: true })
- .addField({ name: '**Discord.js Version**', value: discordJSVersion, inline: true })
- .addField({ name: '**Node.js Version**', value: process.version.slice(1), inline: true })
- .addField({ name: '**Commands**', value: client.commandHandler.modules.size.toLocaleString(), inline: true })
- .addField({ name: '**Listeners**', value: client.listenerHandler.modules.size.toLocaleString(), inline: true })
- .addField({ name: '**Inhibitors**', value: client.inhibitorHandler.modules.size.toLocaleString(), inline: true })
- .addField({ name: '**Tasks**', value: client.taskHandler.modules.size.toLocaleString(), inline: true })
- .addField({
+ .addFields({ name: '**CPU Usage**', value: `${client.stats.cpu}%`, inline: true })
+ .addFields({ name: '**Platform**', value: Platform[process.platform], inline: true })
+ .addFields({ name: '**Commands Used**', value: `${client.stats.commandsUsed.toLocaleString()}`, inline: true })
+ .addFields({ name: '**Servers**', value: client.guilds.cache.size.toLocaleString(), inline: true })
+ .addFields({ name: '**Users**', value: client.users.cache.size.toLocaleString(), inline: true })
+ .addFields({ name: '**Discord.js Version**', value: discordJSVersion, inline: true })
+ .addFields({ name: '**Node.js Version**', value: process.version.slice(1), inline: true })
+ .addFields({ name: '**Commands**', value: client.commandHandler.modules.size.toLocaleString(), inline: true })
+ .addFields({ name: '**Listeners**', value: client.listenerHandler.modules.size.toLocaleString(), inline: true })
+ .addFields({ name: '**Inhibitors**', value: client.inhibitorHandler.modules.size.toLocaleString(), inline: true })
+ .addFields({ name: '**Tasks**', value: client.taskHandler.modules.size.toLocaleString(), inline: true })
+ .addFields({
name: '**Current Commit**',
value: `[${currentCommit.substring(0, 7)}](${repoUrl}/commit/${currentCommit})`,
inline: true
})
- .addField({ name: '**Developers**', value: developers, inline: true })
+ .addFields({ name: '**Developers**', value: developers, inline: true })
.setTimestamp()
.setColor(util.colors.default);
await message.util.reply({ embeds: [embed] });
diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts
index 6aad1fe..49e827d 100644
--- a/src/commands/info/color.ts
+++ b/src/commands/info/color.ts
@@ -76,10 +76,10 @@ export default class ColorCommand extends BushCommand {
}
const embed = new Embed()
- .addField({ name: '» Hexadecimal', value: color.toHexString() })
- .addField({ name: '» Decimal', value: `${parseInt(color.toHex(), 16)}` })
- .addField({ name: '» HSL', value: this.removePrefixAndParenthesis(color.toHslString()) })
- .addField({ name: '» RGB', value: this.removePrefixAndParenthesis(color.toRgbString()) })
+ .addFields({ name: '» Hexadecimal', value: color.toHexString() })
+ .addFields({ name: '» Decimal', value: `${parseInt(color.toHex(), 16)}` })
+ .addFields({ name: '» HSL', value: this.removePrefixAndParenthesis(color.toHslString()) })
+ .addFields({ name: '» RGB', value: this.removePrefixAndParenthesis(color.toRgbString()) })
.setColor(parseInt(color.toHex(), 16));
return await message.util.reply({ embeds: [embed] });
diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts
index ed8a973..7f82e92 100644
--- a/src/commands/info/guildInfo.ts
+++ b/src/commands/info/guildInfo.ts
@@ -155,7 +155,7 @@ export default class GuildInfoCommand extends BushCommand {
);
}
- embed.addField({ name: '» About', value: guildAbout.join('\n') });
+ embed.addFields({ name: '» About', value: guildAbout.join('\n') });
}
private generateStatsField(embed: Embed, guild: Guild | GuildPreview) {
@@ -191,7 +191,7 @@ export default class GuildInfoCommand extends BushCommand {
`**Stickers:** ${guild.stickers.cache.size?.toLocaleString() ?? 0} / ${StickerTierMap[guild.premiumTier]}`
);
- embed.addField({ name: '» Stats', value: guildStats.join('\n') });
+ embed.addFields({ name: '» Stats', value: guildStats.join('\n') });
}
private generateSecurityField(embed: Embed, guild: Guild | GuildPreview) {
@@ -206,7 +206,7 @@ export default class GuildInfoCommand extends BushCommand {
`**2FA Required:** ${guild.mfaLevel === GuildMFALevel.Elevated ? 'True' : 'False'}`
);
- embed.addField({ name: '» Security', value: guildSecurity.join('\n') });
+ embed.addFields({ name: '» Security', value: guildSecurity.join('\n') });
}
}
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 15c447a..04abd18 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -87,7 +87,7 @@ export default class HelpCommand extends BushCommand {
.replace(/'(S)/g, (letter) => letter.toLowerCase());
const categoryCommands = categoryFilter.filter((cmd) => cmd.aliases.length > 0).map((cmd) => `\`${cmd.aliases[0]}\``);
if (categoryCommands.length > 0) {
- embed.addField({ name: `${categoryNice}`, value: `${categoryCommands.join(' ')}` });
+ embed.addFields({ name: `${categoryNice}`, value: `${categoryCommands.join(' ')}` });
}
}
return await message.util.reply({ embeds: [embed], components: row.components.length ? [row] : undefined });
@@ -98,18 +98,18 @@ export default class HelpCommand extends BushCommand {
.setTitle(`${command.id} Command`)
.setDescription(`${command.description ?? '*This command does not have a description.*'}`);
if (command.usage?.length) {
- embed.addField({
+ embed.addFields({
name: `» Usage${command.usage.length > 1 ? 's' : ''}`,
value: command.usage.map((u) => `\`${u}\``).join('\n')
});
}
if (command.examples?.length) {
- embed.addField({
+ embed.addFields({
name: `» Example${command.examples.length > 1 ? 's' : ''}`,
value: command.examples.map((u) => `\`${u}\``).join('\n')
});
}
- if (command.aliases?.length > 1) embed.addField({ name: '» Aliases', value: `\`${command.aliases.join('` `')}\`` });
+ if (command.aliases?.length > 1) embed.addFields({ name: '» Aliases', value: `\`${command.aliases.join('` `')}\`` });
if (
command.ownerOnly ||
command.superUserOnly ||
@@ -132,7 +132,7 @@ export default class HelpCommand extends BushCommand {
.map((g) => util.format.inlineCode(client.guilds.cache.find((g1) => g1.id === g)?.name ?? 'Unknown'))
.join(' ')}`
);
- if (restrictions.length) embed.addField({ name: '» Restrictions', value: restrictions.join('\n') });
+ if (restrictions.length) embed.addFields({ name: '» Restrictions', value: restrictions.join('\n') });
}
const params = { embeds: [embed], components: row.components.length ? [row] : undefined };
diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts
index c767361..1b5e45a 100644
--- a/src/commands/info/ping.ts
+++ b/src/commands/info/ping.ts
@@ -22,8 +22,8 @@ export default class PingCommand extends BushCommand {
const apiLatency = `${'```'}\n ${Math.round(message.client.ws.ping)}ms ${'```'}`;
const embed = new Embed()
.setTitle('Pong! 🏓')
- .addField({ name: 'Bot Latency', value: botLatency, inline: true })
- .addField({ name: 'API Latency', value: apiLatency, inline: true })
+ .addFields({ name: 'Bot Latency', value: botLatency, inline: true })
+ .addFields({ name: 'API Latency', value: apiLatency, inline: true })
.setFooter({ text: message.author.username, iconURL: message.author.displayAvatarURL() })
.setColor(util.colors.default)
.setTimestamp();
@@ -41,8 +41,8 @@ export default class PingCommand extends BushCommand {
const apiLatency = `${'```'}\n ${Math.round(client.ws.ping)}ms ${'```'}`;
const embed = new Embed()
.setTitle('Pong! 🏓')
- .addField({ name: 'Bot Latency', value: botLatency, inline: true })
- .addField({ name: 'API Latency', value: apiLatency, inline: true })
+ .addFields({ name: 'Bot Latency', value: botLatency, inline: true })
+ .addFields({ name: 'API Latency', value: apiLatency, inline: true })
.setFooter({
text: message.interaction.user.username,
iconURL: message.interaction.user.displayAvatarURL()
diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts
index 3295960..c64a286 100644
--- a/src/commands/info/snowflake.ts
+++ b/src/commands/info/snowflake.ts
@@ -61,7 +61,7 @@ export default class SnowflakeCommand extends BushCommand {
);
snowflakeEmbed.setTitle(`:snowflake: ${util.discord.escapeMarkdown(channel.name)} \`[Channel]\``);
}
- snowflakeEmbed.addField({ name: '» Channel Info', value: channelInfo.join('\n') });
+ snowflakeEmbed.addFields({ name: '» Channel Info', value: channelInfo.join('\n') });
}
// Guild
@@ -75,7 +75,7 @@ export default class SnowflakeCommand extends BushCommand {
`**Members:** ${guild.memberCount?.toLocaleString()}`
];
if (guild.icon) snowflakeEmbed.setThumbnail(guild.iconURL({ size: 2048 })!);
- snowflakeEmbed.addField({ name: '» Server Info', value: guildInfo.join('\n') });
+ snowflakeEmbed.addFields({ name: '» Server Info', value: guildInfo.join('\n') });
snowflakeEmbed.setTitle(`:snowflake: ${util.discord.escapeMarkdown(guild.name)} \`[Server]\``);
}
@@ -85,7 +85,7 @@ export default class SnowflakeCommand extends BushCommand {
const user: User = (client.users.cache.get(snowflake) ?? fetchedUser)!;
const userInfo = [`**Name:** <@${user.id}> (${util.discord.escapeMarkdown(user.tag)})`];
if (user.avatar) snowflakeEmbed.setThumbnail(user.avatarURL({ size: 2048 })!);
- snowflakeEmbed.addField({ name: '» User Info', value: userInfo.join('\n') });
+ snowflakeEmbed.addFields({ name: '» User Info', value: userInfo.join('\n') });
snowflakeEmbed.setTitle(`:snowflake: ${util.discord.escapeMarkdown(user.tag)} \`[User]\``);
}
@@ -97,7 +97,7 @@ export default class SnowflakeCommand extends BushCommand {
`**Animated:** ${emoji.animated}`
];
if (emoji.url) snowflakeEmbed.setThumbnail(emoji.url);
- snowflakeEmbed.addField({ name: '» Emoji Info', value: emojiInfo.join('\n') });
+ snowflakeEmbed.addFields({ name: '» Emoji Info', value: emojiInfo.join('\n') });
snowflakeEmbed.setTitle(`:snowflake: ${util.discord.escapeMarkdown(emoji.name ?? '¯\\_(ツ)_/¯')} \`[Emoji]\``);
}
@@ -113,7 +113,7 @@ export default class SnowflakeCommand extends BushCommand {
`**Hex Color:** ${role.hexColor}`
];
if (role.color) snowflakeEmbed.setColor(role.color);
- snowflakeEmbed.addField({ name: '» Role Info', value: roleInfo.join('\n') });
+ snowflakeEmbed.addFields({ name: '» Role Info', value: roleInfo.join('\n') });
snowflakeEmbed.setTitle(`:snowflake: ${util.discord.escapeMarkdown(role.name)} \`[Role]\``);
}
@@ -126,7 +126,7 @@ export default class SnowflakeCommand extends BushCommand {
`**Process ID:** ${deconstructedSnowflake.processId}`,
`**Increment:** ${deconstructedSnowflake.increment}`
];
- snowflakeEmbed.addField({ name: '» Snowflake Info', value: snowflakeInfo.join('\n') });
+ snowflakeEmbed.addFields({ name: '» Snowflake Info', value: snowflakeInfo.join('\n') });
return await message.util.reply({ embeds: [snowflakeEmbed] });
}
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 0ff8611..a09d8ca 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -132,7 +132,7 @@ export default class UserInfoCommand extends BushCommand {
if (pronouns && typeof pronouns === 'string' && pronouns !== 'Unspecified') generalInfo.push(`**Pronouns:** ${pronouns}`);
- embed.addField({ name: '» General Info', value: generalInfo.join('\n') });
+ embed.addFields({ name: '» General Info', value: generalInfo.join('\n') });
}
private static generateServerInfoField(embed: Embed, member?: BushGuildMember | undefined) {
@@ -156,7 +156,7 @@ export default class UserInfoCommand extends BushCommand {
)
serverUserInfo.push(`**General Deletions:** ⅓`);
if (member?.nickname) serverUserInfo.push(`**Nickname:** ${util.discord.escapeMarkdown(member?.nickname)}`);
- if (serverUserInfo.length) embed.addField({ name: '» Server Info', value: serverUserInfo.join('\n') });
+ if (serverUserInfo.length) embed.addFields({ name: '» Server Info', value: serverUserInfo.join('\n') });
}
private static generatePresenceField(embed: Embed, member?: BushGuildMember | undefined) {
@@ -184,7 +184,7 @@ export default class UserInfoCommand extends BushCommand {
if (activitiesNames.length)
presenceInfo.push(`**Activit${activitiesNames.length - 1 ? 'ies' : 'y'}:** ${util.oxford(activitiesNames, 'and', '')}`);
if (customStatus && customStatus.length) presenceInfo.push(`**Custom Status:** ${util.discord.escapeMarkdown(customStatus)}`);
- embed.addField({ name: '» Presence', value: presenceInfo.join('\n') });
+ embed.addFields({ name: '» Presence', value: presenceInfo.join('\n') });
enum statusEmojis {
online = '787550449435803658',
@@ -207,7 +207,7 @@ export default class UserInfoCommand extends BushCommand {
.filter((role) => role.name !== '@everyone')
.sort((role1, role2) => role2.position - role1.position)
.map((role) => `${role}`);
- embed.addField({ name: `» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`, value: roles.join(', ') });
+ embed.addFields({ name: `» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`, value: roles.join(', ') });
}
private static generatePermissionsField(embed: Embed, member: BushGuildMember | undefined) {
@@ -225,7 +225,7 @@ export default class UserInfoCommand extends BushCommand {
});
}
- if (perms.length) embed.addField({ name: '» Important Perms', value: perms.join(' ') });
+ if (perms.length) embed.addFields({ name: '» Important Perms', value: perms.join(' ') });
}
private static async generateBotField(embed: Embed, user: BushUser) {
@@ -275,6 +275,6 @@ export default class UserInfoCommand extends BushCommand {
);
}
- if (botInfo.length) embed.addField({ name: '» Bot Info', value: botInfo.join('\n') });
+ if (botInfo.length) embed.addFields({ name: '» Bot Info', value: botInfo.join('\n') });
}
}