Sapphire - Imagine a framework
Sapphire - Imagine a framework

sapphire-support

Root Question Message

thooooooor
thooooooor1/15/2023
Creating slash command with options and sapphire cli template

Hey there. I'm using the bot template from the sapphire cli and now wanted to try and create a slash command with options, but sadly don't know how to start. As I read the docs already, I know there's documentation at discord.js, but it doesn't apply to the template of the cli. Therefore any help with sapphire cli template in mind would be grateful.
thooooooor
thooooooor1/15/2023
I first thought I could use the options keyword inside, like this:

@ApplyOptions<Command.Options>({
    description: 'Description',
    options: ['d', 'c']
})


but this didn't work
Krish
Krish1/15/2023
what do you exactly need? Please elaborate
thooooooor
thooooooor1/15/2023
Here's an example of what I mean
thooooooor
thooooooor1/15/2023
I want to have such an option with my slash command
thooooooor
thooooooor1/15/2023
I think I need to add it in the registry. but how would I do it?
Krish
Krish1/15/2023
you need to build your slash commands with options
Krish
Krish1/15/2023
read the guide for better understanding
Krish
Krish1/15/2023
and for more reference look into examples

Solution Message

thooooooor
thooooooor1/15/2023
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy