aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info/botInfo.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/info/botInfo.ts')
-rw-r--r--src/commands/info/botInfo.ts23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts
index decbe04..25b860c 100644
--- a/src/commands/info/botInfo.ts
+++ b/src/commands/info/botInfo.ts
@@ -3,7 +3,6 @@ import {
clientSendAndPermCheck,
colors,
humanizeDuration,
- mapIDs,
shell,
type CommandMessage,
type SlashMessage
@@ -44,14 +43,14 @@ export default class BotInfoCommand extends BushCommand {
haiku = 'Haiku'
}
- const developers = (await mapIDs(client.config.owners)).map((u) => u?.tag).join('\n');
+ const developers = (await this.client.utils.mapIDs(this.client.config.owners)).map((u) => u?.tag).join('\n');
const currentCommit = (await shell('git rev-parse HEAD')).stdout.replace('\n', '');
let repoUrl = (await shell('git remote get-url origin')).stdout.replace('\n', '');
if (repoUrl.includes('.git')) repoUrl = repoUrl.substring(0, repoUrl.length - 4);
const embed = new EmbedBuilder()
.setTitle('Bot Info:')
.addFields([
- { name: '**Uptime**', value: humanizeDuration(client.uptime!, 2), inline: true },
+ { name: '**Uptime**', value: humanizeDuration(this.client.uptime!, 2), inline: true },
{
name: '**Memory Usage**',
value: `System: ${prettyBytes(os.totalmem() - os.freemem(), { binary: true })}/${prettyBytes(os.totalmem(), {
@@ -62,18 +61,18 @@ export default class BotInfoCommand extends BushCommand {
)}`,
inline: true
},
- { name: '**CPU Usage**', value: `${client.stats.cpu}%`, inline: true },
+ { name: '**CPU Usage**', value: `${this.client.stats.cpu}%`, inline: true },
{ name: '**Platform**', value: Platform[process.platform], inline: true },
- { name: '**Commands Used**', value: `${client.stats.commandsUsed.toLocaleString()}`, inline: true },
- { name: '**Slash Commands Used**', value: `${client.stats.slashCommandsUsed.toLocaleString()}`, inline: true },
- { name: '**Servers**', value: client.guilds.cache.size.toLocaleString(), inline: true },
- { name: '**Users**', value: client.users.cache.size.toLocaleString(), inline: true },
+ { name: '**Commands Used**', value: `${this.client.stats.commandsUsed.toLocaleString()}`, inline: true },
+ { name: '**Slash Commands Used**', value: `${this.client.stats.slashCommandsUsed.toLocaleString()}`, inline: true },
+ { name: '**Servers**', value: this.client.guilds.cache.size.toLocaleString(), inline: true },
+ { name: '**Users**', value: this.client.users.cache.size.toLocaleString(), inline: true },
{ name: '**Discord.js Version**', value: discordJSVersion, inline: true },
{ name: '**Node.js Version**', value: process.version.slice(1), inline: true },
- { name: '**Commands**', value: client.commandHandler.modules.size.toLocaleString(), inline: true },
- { name: '**Listeners**', value: client.listenerHandler.modules.size.toLocaleString(), inline: true },
- { name: '**Inhibitors**', value: client.inhibitorHandler.modules.size.toLocaleString(), inline: true },
- { name: '**Tasks**', value: client.taskHandler.modules.size.toLocaleString(), inline: true },
+ { name: '**Commands**', value: this.client.commandHandler.modules.size.toLocaleString(), inline: true },
+ { name: '**Listeners**', value: this.client.listenerHandler.modules.size.toLocaleString(), inline: true },
+ { name: '**Inhibitors**', value: this.client.inhibitorHandler.modules.size.toLocaleString(), inline: true },
+ { name: '**Tasks**', value: this.client.taskHandler.modules.size.toLocaleString(), inline: true },
{
name: '**Current Commit**',
value: `[${currentCommit.substring(0, 7)}](${repoUrl}/commit/${currentCommit})`,