Format number in uses

This commit is contained in:
Dragon Fire
2020-11-29 10:54:36 -05:00
parent f9f82d4064
commit e2f55c048c
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = class PrefixCommand extends Command {
run(msg) {
const prefix = msg.guild ? msg.guild.commandPrefix : this.client.commandPrefix;
return msg.reply(stripIndents`
${prefix ? `The command prefix is \`\`${prefix}\`\`.` : 'There is no command prefix.'}
${prefix ? `The command prefix is \`${prefix}\`.` : 'There is no command prefix.'}
To run a command, use ${msg.anyUsage('<command>')}.
`);
}
+2 -1
View File
@@ -1,4 +1,5 @@
const Command = require('../../structures/Command');
const { formatNumber } = require('../../util/Util');
module.exports = class UsesCommand extends Command {
constructor(client) {
@@ -21,6 +22,6 @@ module.exports = class UsesCommand extends Command {
run(msg, { command }) {
if (command.uses === undefined) return msg.reply('That command\'s usage stats aren\'t being tracked.');
return msg.say(`The \`${command.name}\` command has been used **${command.uses}** times.`);
return msg.say(`The \`${command.name}\` command has been used **${formatNumber(command.uses)}** times.`);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "123.0.0",
"version": "123.0.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {