diff options
Diffstat (limited to 'src/commands/info/botInfo.ts')
-rw-r--r-- | src/commands/info/botInfo.ts | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts index d9961af..d5941b2 100644 --- a/src/commands/info/botInfo.ts +++ b/src/commands/info/botInfo.ts @@ -1,5 +1,5 @@ import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { MessageEmbed } from 'discord.js'; +import { MessageEmbed, version as discordJSVersion } from 'discord.js'; export default class BotInfoCommand extends BushCommand { public constructor() { @@ -18,32 +18,24 @@ export default class BotInfoCommand extends BushCommand { } public async exec(message: BushMessage | BushSlashMessage): Promise<void> { - const owners = (await this.client.util.mapIDs(this.client.ownerID)).map((u) => u.tag).join('\n'); + const developers = (await this.client.util.mapIDs(this.client.config.owners)).map((u) => u?.tag).join('\n'); const currentCommit = (await this.client.util.shell('git rev-parse HEAD')).stdout.replace('\n', ''); const repoUrl = (await this.client.util.shell('git remote get-url origin')).stdout.replace('\n', ''); const embed = new MessageEmbed() .setTitle('Bot Info:') - .addFields([ - { - name: 'Owners', - value: owners, - inline: true - }, - { - name: 'Uptime', - value: this.client.util.capitalize(this.client.util.humanizeDuration(this.client.uptime)) - }, - { - name: 'User count', - value: this.client.users.cache.size.toLocaleString(), - inline: true - }, - { - name: 'Current commit', - value: `[${currentCommit.substring(0, 7)}](${repoUrl}/commit/${currentCommit})` - } - ]) - .setTimestamp(); + .addField('**Uptime**', this.client.util.humanizeDuration(this.client.uptime), true) + .addField('**Servers**', this.client.guilds.cache.size.toLocaleString(), true) + .addField('**Users**', this.client.users.cache.size.toLocaleString(), true) + .addField('**Discord.js Version**', discordJSVersion, true) + .addField('**Node.js Version**', process.version.slice(1), true) + .addField('**Commands**', this.client.commandHandler.modules.size.toLocaleString(), true) + .addField('**Listeners**', this.client.listenerHandler.modules.size.toLocaleString(), true) + .addField('**Inhibitors**', this.client.inhibitorHandler.modules.size.toLocaleString(), true) + .addField('**Tasks**', this.client.taskHandler.modules.size.toLocaleString(), true) + .addField('**Current Commit**', `[${currentCommit.substring(0, 7)}](${repoUrl}/commit/${currentCommit})`, true) + .addField('**Developers**', developers, true) + .setTimestamp() + .setColor(this.client.util.colors.default); await message.util.reply({ embeds: [embed] }); } } |