mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 22:14:34 +02:00
Format number in uses
This commit is contained in:
@@ -15,7 +15,7 @@ module.exports = class PrefixCommand extends Command {
|
|||||||
run(msg) {
|
run(msg) {
|
||||||
const prefix = msg.guild ? msg.guild.commandPrefix : this.client.commandPrefix;
|
const prefix = msg.guild ? msg.guild.commandPrefix : this.client.commandPrefix;
|
||||||
return msg.reply(stripIndents`
|
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>')}.
|
To run a command, use ${msg.anyUsage('<command>')}.
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const Command = require('../../structures/Command');
|
const Command = require('../../structures/Command');
|
||||||
|
const { formatNumber } = require('../../util/Util');
|
||||||
|
|
||||||
module.exports = class UsesCommand extends Command {
|
module.exports = class UsesCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -21,6 +22,6 @@ module.exports = class UsesCommand extends Command {
|
|||||||
|
|
||||||
run(msg, { command }) {
|
run(msg, { command }) {
|
||||||
if (command.uses === undefined) return msg.reply('That command\'s usage stats aren\'t being tracked.');
|
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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "123.0.0",
|
"version": "123.0.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user