Files
xiao/commands/util/uses.js
T
Dragon Fire 9ed5aab2e2 Fix lint
2020-06-01 23:45:27 -04:00

26 lines
660 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class UsesCommand extends Command {
constructor(client) {
super(client, {
name: 'uses',
group: 'util',
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.`);
}
};