Class SlashCommandUpdater
java.lang.Object
com.github.kaktushose.jda.commands.internal.register.SlashCommandUpdater
Class that sends the
CommandData
to Discord.- See Also:
- Implementation Note:
- Uses a
CommandTree
to properly transpile allSlashCommandDefinition
s toSlashCommandData
.
-
Constructor Summary
ConstructorsConstructorDescriptionSlashCommandUpdater
(JDAContext jdaContext, GuildScopeProvider guildScopeProvider, InteractionRegistry registry) Constructs a new SlashCommandUpdater. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sends theSlashCommandData
to Discord.void
Registers allCommandDefinition
s withCommandScope.GLOBAL
.void
Sends the guild scopeSlashCommandData
to Discord.
-
Constructor Details
-
SlashCommandUpdater
public SlashCommandUpdater(JDAContext jdaContext, GuildScopeProvider guildScopeProvider, InteractionRegistry registry) Constructs a new SlashCommandUpdater.
-
-
Method Details
-
updateAllCommands
public void updateAllCommands()Sends theSlashCommandData
to Discord. This is equivalent to callingupdateGlobalCommands()
andupdateGuildCommands()
each. -
updateGlobalCommands
public void updateGlobalCommands()Registers allCommandDefinition
s withCommandScope.GLOBAL
. -
updateGuildCommands
public void updateGuildCommands()Sends the guild scopeSlashCommandData
to Discord.
-