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
@@ -29,7 +29,7 @@ module.exports = class GenerateCommandsCommand extends Command {
})
.filter(cmds => cmds);
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!');
if (msg.guild) await msg.say('📬 Sent `commands.txt` to your DMs!');
return msg.direct({ files: [{ attachment: Buffer.from(text), name: 'commands.txt' }] });
}
};