Interface SlashCommandBuilderDelegate
-
public interface SlashCommandBuilderDelegateThis class is internally used by theSlashCommandBuilder. You usually don't want to interact with this object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddOption(SlashCommandOption option)Adds an slash command option to the slash command.CompletableFuture<SlashCommand>createForServer(Server server)Creates an slash command for a specific server.CompletableFuture<SlashCommand>createGlobal(DiscordApi api)Creates a global slash command.voidsetDefaultPermission(Boolean defaultPermission)Sets the default permission for the slash command whether the command is enabled by default when the app is added to a server.voidsetDescription(String description)Sets the description of the slash command.voidsetName(String name)Sets the name of the slash command.voidsetOptions(List<SlashCommandOption> options)Sets the slash commands for the slash command.
-
-
-
Method Detail
-
setName
void setName(String name)
Sets the name of the slash command.- Parameters:
name- The name.
-
setDescription
void setDescription(String description)
Sets the description of the slash command.- Parameters:
description- The name.
-
addOption
void addOption(SlashCommandOption option)
Adds an slash command option to the slash command.- Parameters:
option- The option.
-
setOptions
void setOptions(List<SlashCommandOption> options)
Sets the slash commands for the slash command.- Parameters:
options- The options.
-
setDefaultPermission
void setDefaultPermission(Boolean defaultPermission)
Sets the default permission for the slash command whether the command is enabled by default when the app is added to a server.- Parameters:
defaultPermission- The default permission.
-
createGlobal
CompletableFuture<SlashCommand> createGlobal(DiscordApi api)
Creates a global slash command.- Parameters:
api- The discord api instance.- Returns:
- The built slash command.
-
createForServer
CompletableFuture<SlashCommand> createForServer(Server server)
Creates an slash command for a specific server.- Parameters:
server- The server.- Returns:
- The built slash command.
-
-