diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-13 15:04:42 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-13 15:04:42 -0400 |
commit | cdb8b0297f806cb3147b3759b0fd234bffbcc3f9 (patch) | |
tree | 665c8d746e1ec7dee5755edbc7a8e6be7f77c26d /src/commands/info/botInfo.ts | |
parent | 528a4c2bde37ca7d1ded38af31f4a482d492d894 (diff) | |
download | tanzanite-cdb8b0297f806cb3147b3759b0fd234bffbcc3f9.tar.gz tanzanite-cdb8b0297f806cb3147b3759b0fd234bffbcc3f9.tar.bz2 tanzanite-cdb8b0297f806cb3147b3759b0fd234bffbcc3f9.zip |
added unmute and unban command
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] }); } } |