Name of the option, 1-32 characters (no symbols except - and _)
What type of option this is
Description of the option, 1-100 characters long
Optional
opts: OptionsKindTable[TKind] & BaseOptionSettings<TRequired>Additional options, depends on what "kind" you pass but all options has a "required" field that defaults to true
See addOption
Optional
opts: AttachmentOption & BaseOptionSettings<TRequired>See addOption
Optional
opts: BooleanOption & BaseOptionSettings<TRequired>See addOption
Optional
opts: ChannelOption & BaseOptionSettings<TRequired>See addOption
Optional
opts: IntegerOption & BaseOptionSettings<TRequired>See addOption
Optional
opts: MentionableOption & BaseOptionSettings<TRequired>See addOption
Optional
opts: NumberOption & BaseOptionSettings<TRequired>See addOption
Optional
opts: RoleOption & BaseOptionSettings<TRequired>See addOption
Optional
opts: StringOption & BaseOptionSettings<TRequired>See addOption
Optional
opts: UserOption & BaseOptionSettings<TRequired>Build the command, providing a callback that runs when the command gets executed
The built command, if you used script.createSlashCommand
you can ignore the return value but if not you pass it to @{link Script.createCommand} to actually create it on discord
Sets the flags for the mssage sent when sending the intial interaction response. Epehemeral means that it can only be see by the person issuing the command.
Set the ack mode of this command (if you're experienced with the discord api, this is the callback type to the interaction)
DeferredMessage
: It will respond with a deferred message, using the flags from setAckMessageFlags.
Custom
: You handle the ack'ing of the interaction yourself, this allows you to use modals.
Keep in mind when using custom, you have to ack the interaction within 3 seconds otherwise it will fail.
Assigns a group to this command
const group = new Commands.Group("some-group", "some description")
script.addCommand(Commands.slashCommand("some-cmd", "some description").setGroup(grou).build(...))
Generated using TypeDoc
Adds a option/argument to this command.
Each type of option has different settings you can adjust, but all of them have a "required" field that defaults to true, you can set it to false for optional options.