mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
26 lines
667 B
JavaScript
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.`);
|
|
}
|
|
};
|