This commit is contained in:
Dragon Fire
2020-06-07 18:29:11 -04:00
parent 9841a4db16
commit 8838a04244
5 changed files with 15 additions and 11 deletions
@@ -25,6 +25,6 @@ module.exports = class CommandLeaderboardExportCommand extends Command {
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!');
return msg.say('📬 Sent `command-leaderboard.json` to your DMs!');
}
};
+1 -1
View File
@@ -25,6 +25,6 @@ module.exports = class GenerateCommandsCommand extends Command {
});
const text = `Total: ${this.client.registry.commands.size}\n${list.join('\n')}`;
await msg.direct({ files: [{ attachment: Buffer.from(text), name: 'commands.txt' }] });
return msg.say('📬 Sent \`commands.txt\` to your DMs!');
return msg.say('📬 Sent `commands.txt` to your DMs!');
}
};
+1 -1
View File
@@ -48,6 +48,6 @@ module.exports = class GenerateCreditCommand extends Command {
return ` * ${cmd.name} (${embedURL(cmd.reason, cmd.reasonURL || '', false)})`;
}).join('\n')}`);
await msg.direct({ files: [{ attachment: Buffer.from(mapped.join('\n')), name: 'credit.txt' }] });
return msg.say('📬 Sent \`credit.txt\` to your DMs!');
return msg.say('📬 Sent `credit.txt` to your DMs!');
}
};
+1 -2
View File
@@ -1,7 +1,6 @@
const Command = require('../../structures/Command');
const fs = require('fs');
const path = require('path');
const { verify } = require('../../util/Util');
module.exports = class GenerateProcessEnvCommand extends Command {
constructor(client) {
@@ -26,6 +25,6 @@ module.exports = class GenerateProcessEnvCommand extends Command {
return `${line}="${process.env[line] || ''}"`;
}).join('\n');
await msg.direct({ files: [{ attachment: Buffer.from(list), name: 'process.env.txt' }] });
return msg.say('📬 Sent \`process.env.txt\` to your DMs!');
return msg.say('📬 Sent `process.env.txt` to your DMs!');
}
};
+11 -6
View File
@@ -23,11 +23,16 @@ module.exports = class ShutdownCommand extends Command {
}
async run(msg, { code }) {
this.uses++;
this.client.exportCommandLeaderboard();
this.client.logger.info('[SHUTDOWN] Manual shutdown engaged.');
await msg.say('Shutting down... :(');
process.exit(code);
return null;
try {
this.uses++;
this.client.exportCommandLeaderboard();
this.client.logger.info('[SHUTDOWN] Manual shutdown engaged.');
await msg.say('Shutting down... :(');
process.exit(code);
return null;
} catch {
process.exit(code);
return null;
}
}
};