mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 15:57:47 +02:00
Add NSFW and guildOnly options
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user