Interface SlashCommandUpdaterDelegate
-
public interface SlashCommandUpdaterDelegate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsetDefaultPermission(boolean defaultPermission)Sets the new slash command default permission.voidsetDescription(String description)Sets the new description of the slash command.voidsetName(String name)Sets the new name of the slash command.voidsetOptions(List<SlashCommandOption> slashCommandOptions)Sets the new slash command options.CompletableFuture<SlashCommand>updateForServer(Server server)Performs the queued update.CompletableFuture<SlashCommand>updateGlobal(DiscordApi api)Performs the queued update.
-
-
-
Method Detail
-
setName
void setName(String name)
Sets the new name of the slash command.- Parameters:
name- The name to set.
-
setDescription
void setDescription(String description)
Sets the new description of the slash command.- Parameters:
description- The description to set.
-
setOptions
void setOptions(List<SlashCommandOption> slashCommandOptions)
Sets the new slash command options.- Parameters:
slashCommandOptions- The slash command options to set.
-
setDefaultPermission
void setDefaultPermission(boolean defaultPermission)
Sets the new slash command default permission.- Parameters:
defaultPermission- The default permission to set.
-
updateGlobal
CompletableFuture<SlashCommand> updateGlobal(DiscordApi api)
Performs the queued update.- Parameters:
api- The DiscordApi.- Returns:
- A future with the updated slash command to check if the update was successful.
-
updateForServer
CompletableFuture<SlashCommand> updateForServer(Server server)
Performs the queued update.- Parameters:
server- The server where the command should be updated.- Returns:
- A future with the updated slash command to check if the update was successful.
-
-