Package org.javacord.api.interaction
Class SlashCommandBuilder
- java.lang.Object
-
- org.javacord.api.interaction.ApplicationCommandBuilder<SlashCommand,SlashCommandBuilderDelegate,SlashCommandBuilder>
-
- org.javacord.api.interaction.SlashCommandBuilder
-
public class SlashCommandBuilder extends ApplicationCommandBuilder<SlashCommand,SlashCommandBuilderDelegate,SlashCommandBuilder>
This class is used to create new slash commands.
-
-
Constructor Summary
Constructors Constructor Description SlashCommandBuilder()
Creates a new slash command builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SlashCommandBuilder
addOption(SlashCommandOption option)
Adds a slash command option to the slash command.SlashCommandBuilder
setOptions(java.util.List<SlashCommandOption> options)
Sets the slash commands for the slash command.-
Methods inherited from class org.javacord.api.interaction.ApplicationCommandBuilder
addDescriptionLocalization, addNameLocalization, createForServer, createForServer, createGlobal, getDelegate, setDefaultDisabled, setDefaultEnabledForEveryone, setDefaultEnabledForPermissions, setDefaultEnabledForPermissions, setDescription, setEnabledInDms, setName
-
-
-
-
Method Detail
-
addOption
public SlashCommandBuilder addOption(SlashCommandOption option)
Adds a slash command option to the slash command.- Parameters:
option
- The option.- Returns:
- The current instance in order to chain call methods.
-
setOptions
public SlashCommandBuilder setOptions(java.util.List<SlashCommandOption> options)
Sets the slash commands for the slash command.- Parameters:
options
- The options.- Returns:
- The current instance in order to chain call methods.
-
-