Person Command, Split util to where eval is owner

This commit is contained in:
Dragon Fire
2020-06-09 11:57:21 -04:00
parent 8c747aa3e6
commit 256ec32279
25 changed files with 56 additions and 26 deletions
@@ -0,0 +1,30 @@
const Command = require('../../structures/Command');
module.exports = class CommandLeaderboardExportCommand extends Command {
constructor(client) {
super(client, {
name: 'command-leaderboard-export',
aliases: [
'cmd-lb-export',
'cmd-leaderboard-export',
'command-lb-export',
'export-cmd-lb',
'export-cmd-leaderboard',
'export-command-lb',
'export-command-leaderboard'
],
group: 'util',
memberName: 'command-leaderboard-export',
description: 'Exports a command leaderboard JSON file.',
details: 'Only the bot owner(s) may use this command.',
ownerOnly: true,
guarded: true
});
}
async run(msg) {
const result = this.client.exportCommandLeaderboard();
await msg.direct({ files: [{ attachment: result, name: 'command-leaderboard.json' }] });
return msg.say('📬 Sent `command-leaderboard.json` to your DMs!');
}
};