Class CommandUpdater

java.lang.Object
io.github.kaktushose.jdac.internal.register.CommandUpdater

@Internal public final class CommandUpdater extends Object
Class that sends the CommandData to Discord.
See Also:
Implementation Note:
Uses a CommandTree to properly transpile all SlashCommandDefinitions to SlashCommandData.
  • Constructor Details

    • CommandUpdater

      public CommandUpdater(JDAContext jdaContext, GuildScopeProvider guildScopeProvider, InteractionRegistry registry, net.dv8tion.jda.api.interactions.commands.localization.LocalizationFunction localizationFunction)
      Constructs a new CommandUpdater.
  • Method Details

    • updateAllCommands

      public void updateAllCommands()
      Sends the SlashCommandData to Discord. This is equivalent to calling updateGlobalCommands() and [#updateGuildCommands(Collection)()] each.
    • updateGlobalCommands

      public void updateGlobalCommands()
    • updateGuildCommands

      public void updateGuildCommands(@Nullable Collection<net.dv8tion.jda.api.entities.Guild> guilds)
      Sends the guild scope SlashCommandData to Discord.