diff --git a/framework/slash/SlashCommand.js b/framework/slash/SlashCommand.js index 8aaacf71..312de080 100644 --- a/framework/slash/SlashCommand.js +++ b/framework/slash/SlashCommand.js @@ -4,6 +4,8 @@ module.exports = class SlashCommand { this.name = options.name.toLowerCase(); this.description = options.description; + this.nsfw = options.nsfw || false; + this.guildOnly = options.guildOnly || false; this.credit = options.credit || []; this.credit.push({ name: 'Dragon Fire', diff --git a/framework/slash/SlashRegistry.js b/framework/slash/SlashRegistry.js index 8a1fa956..6df7dd56 100644 --- a/framework/slash/SlashRegistry.js +++ b/framework/slash/SlashRegistry.js @@ -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; }