Files
xiao/commands/util-public/uses.js
T
2020-06-09 11:57:21 -04:00

26 lines
667 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class UsesCommand extends Command {
constructor(client) {
super(client, {
name: 'uses',
group: 'util-public',
memberName: 'uses',
description: 'Responds with a command\'s usage stats.',
guarded: true,
args: [
{
key: 'command',
prompt: 'Which command would you like to view the uses of?',
type: '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.`);
}
};