Add last-run file support

This commit is contained in:
Dragon Fire
2021-02-01 21:51:00 -05:00
parent 9d4b525333
commit 50de60cd1f
9 changed files with 117 additions and 3 deletions
+30
View File
@@ -0,0 +1,30 @@
const Command = require('../../structures/Command');
module.exports = class CommandLastRunExportCommand extends Command {
constructor(client) {
super(client, {
name: 'command-last-run-export',
aliases: [
'cmd-lr-export',
'cmd-last-run-export',
'command-lr-export',
'export-cmd-lr',
'export-cmd-last-run',
'export-command-lr',
'export-command-last-run'
],
group: 'util',
memberName: 'command-last-run-export',
description: 'Exports a command last run JSON file.',
details: 'Only the bot owner(s) may use this command.',
ownerOnly: true,
guarded: true
});
}
async run(msg) {
const result = this.client.exportLastRun();
await msg.direct({ files: [{ attachment: result, name: 'command-last-run.json' }] });
return msg.say('📬 Sent `command-last-run.json` to your DMs!');
}
};