Make owner commands cleaner

This commit is contained in:
Dragon Fire
2024-04-26 23:47:58 -04:00
parent 88aa793d99
commit 085546e0cf
7 changed files with 12 additions and 41 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ 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!');
if (msg.guild) await msg.say('📬 Sent `command-leaderboard.json` to your DMs!');
return msg.direct({ files: [{ attachment: result, name: 'command-leaderboard.json' }] });
}
};