Class CommandUpdater
java.lang.Object
io.github.kaktushose.jdac.internal.register.CommandUpdater
Class that sends the
CommandData to Discord.- See Also:
- Implementation Note:
- Uses a
CommandTreeto properly transpile allSlashCommandDefinitions toSlashCommandData.
-
Constructor Summary
ConstructorsConstructorDescriptionCommandUpdater(JDAContext jdaContext, GuildScopeProvider guildScopeProvider, InteractionRegistry registry, LocalizationFunction localizationFunction) Constructs a new CommandUpdater. -
Method Summary
Modifier and TypeMethodDescriptionvoidSends theSlashCommandDatato Discord.voidRegisters allCommandDefinitions withCommandScope.GLOBAL.voidupdateGuildCommands(@Nullable Collection<Guild> guilds) Sends the guild scopeSlashCommandDatato Discord.
-
Constructor Details
-
CommandUpdater
public CommandUpdater(JDAContext jdaContext, GuildScopeProvider guildScopeProvider, InteractionRegistry registry, LocalizationFunction localizationFunction) Constructs a new CommandUpdater.
-
-
Method Details
-
updateAllCommands
public void updateAllCommands()Sends theSlashCommandDatato Discord. This is equivalent to callingupdateGlobalCommands()and [#updateGuildCommands(Collection)()] each. -
updateGlobalCommands
public void updateGlobalCommands()Registers allCommandDefinitions withCommandScope.GLOBAL. -
updateGuildCommands
Sends the guild scopeSlashCommandDatato Discord.
-