Class SlashCommandUpdater
java.lang.Object
io.github.kaktushose.jdac.internal.register.SlashCommandUpdater
Class that sends the
CommandData to Discord.- See Also:
- Implementation Note:
- Uses a
CommandTreeto properly transpile allSlashCommandDefinitions toSlashCommandData.
-
Constructor Summary
ConstructorsConstructorDescriptionSlashCommandUpdater(JDAContext jdaContext, GuildScopeProvider guildScopeProvider, InteractionRegistry registry) Constructs a new SlashCommandUpdater. -
Method Summary
Modifier and TypeMethodDescriptionvoidSends theSlashCommandDatato Discord.voidRegisters allCommandDefinitions withCommandScope.GLOBAL.voidSends the guild scopeSlashCommandDatato Discord.
-
Constructor Details
-
SlashCommandUpdater
public SlashCommandUpdater(JDAContext jdaContext, GuildScopeProvider guildScopeProvider, InteractionRegistry registry) Constructs a new SlashCommandUpdater.
-
-
Method Details
-
updateAllCommands
public void updateAllCommands()Sends theSlashCommandDatato Discord. This is equivalent to callingupdateGlobalCommands()andupdateGuildCommands()each. -
updateGlobalCommands
public void updateGlobalCommands()Registers allCommandDefinitions withCommandScope.GLOBAL. -
updateGuildCommands
public void updateGuildCommands()Sends the guild scopeSlashCommandDatato Discord.
-