Slash Command
Triggers when a slash command is used.
This trigger is based on Discord event InteractionCreate.
Inputs
Command Name
The first part of the slash command. This can be used by itself or with a subcommand to form categories.
Example: moderation
Subcommand Name
The second part of the slash command. This is optional and can be used to form categories.
Example: ban-user
Description
The description of the command. This is shown in the Discord client to indicate the purpose of the command. Max 100 characters.
Example: Bans a user from the server.
Permissions
The permissions needed to run the command.
Example: Administrator
Age Restricted
Whether or not the channel is age restricted (will make the command only visible in channels marked as NSFW)
Collaborator Only
Whether or not the command is for collaborators only. Useful for testing purposes. Will make the command only visible to users with collaborator access to the bot.
Command Availability
Where the command is available.
Integration Type
What installation type this command works with.
Command Options
What fields the user can input when running the slash command. For each option you can fill in the fields:
Type
What type of option this is. Available types:
- Text - A string of text
- Number - A whole number
- Number - A decimal number
- Boolean -
true
orfalse
- Channel - A Discord channel
- User - A Discord user
- Role - A Discord role
- User or Role - Allows a Discord user OR role
- Autocomplete - See the Autocomplete Trigger documentation
Option Name
The name of the option.
Option Description
The description of the option. Shown to the user when they’re filling in the command.
Required
Whether or not the user is required to fill in the option. If this is not checked, make sure to account for if the user does not input a value.
Min Length
The minimum length of the input. Only available for some Types.
Max Length
The maximum length of the input. Only available for some Types.
Choices
If not empty, the user is required to fill the field in with one of the provided options. Only available for some Types.
Example: Option one,Option two,Option three
Outputs
Interaction ID
The interaction ID of the interaction.
Example: 123456789012345678
Interaction Token
The token of the interaction.
Example: abCdeF123gHiJkLmNoPqRsTuVwXyZ0123456789
Server ID
The server ID where the autocomplete interaction is being run.
Example: 123456789012345678
Channel ID
The server ID where the autocomplete interaction is being run.
Example: 123456789012345678
Executing User ID
The ID of the user that is running the command with the autocomplete option.
Example: 123456789012345678
Context Type
The context type of the command.
Example: Server
, DM
App Permissions
What permissions the bot application has in the context type.
Example: 2251799813685247
User Configure Outputs
Depending on your configurations of Slash Command Options, you might have more outputs that correspond to the options you created.