Add NSFW and guildOnly options

This commit is contained in:
Dragon Fire
2024-04-07 20:38:55 -04:00
parent b47ced8dd0
commit 6ce38c282b
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -15,6 +15,8 @@ module.exports = class SlashRegistry {
const slashCmd = new SlashCommandBuilder()
.setName(command.name)
.setDescription(command.description);
if (command.guildOnly) slashCmd.setDMPermission(false);
if (command.nsfw) slashCmd.setNSFW(true);
this.commands.set(command.name, { command, data: slashCmd });
return this;
}