Class ComplexCommandHandler

java.lang.Object
net.dv8tion.jda.api.hooks.ListenerAdapter
tech.xigam.cch.ComplexCommandHandler
All Implemented Interfaces:
net.dv8tion.jda.api.hooks.EventListener

public final class ComplexCommandHandler extends net.dv8tion.jda.api.hooks.ListenerAdapter
The main command handler. Should be initialized on build.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ComplexCommandHandler(boolean usePrefix)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkMessageInteraction(net.dv8tion.jda.api.entities.Message message)
     
    void
    deploy(net.dv8tion.jda.api.entities.Guild guild)
    Deprecated.
    void
    deployAll(net.dv8tion.jda.api.entities.Guild guild)
     
    void
     
    void
    downsert(net.dv8tion.jda.api.entities.Guild guild)
    Delete and create commands.
     
    void
    onButtonInteraction(@NotNull net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent event)
     
    void
    onCommandAutoCompleteInteraction(@NotNull net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent event)
     
    void
    onMessageReceived(@NotNull net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
     
    void
    onMessageUpdate(@NotNull net.dv8tion.jda.api.events.message.MessageUpdateEvent event)
     
    void
    onSelectMenuInteraction(@NotNull net.dv8tion.jda.api.events.interaction.component.SelectMenuInteractionEvent event)
     
    void
    onSlashCommandInteraction(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event)
     
     
    void
    setJda(net.dv8tion.jda.api.JDA jda)
     
    setPrefix(String prefix)
     

    Methods inherited from class net.dv8tion.jda.api.hooks.ListenerAdapter

    onApplicationCommandUpdatePrivileges, onApplicationUpdatePrivileges, onChannelCreate, onChannelDelete, onChannelUpdateArchived, onChannelUpdateArchiveTimestamp, onChannelUpdateAutoArchiveDuration, onChannelUpdateBitrate, onChannelUpdateInvitable, onChannelUpdateLocked, onChannelUpdateName, onChannelUpdateNSFW, onChannelUpdateParent, onChannelUpdatePosition, onChannelUpdateRegion, onChannelUpdateSlowmode, onChannelUpdateTopic, onChannelUpdateType, onChannelUpdateUserLimit, onDisconnect, onEmojiAdded, onEmojiRemoved, onEmojiUpdateName, onEmojiUpdateRoles, onEvent, onException, onGatewayPing, onGenericAutoCompleteInteraction, onGenericChannel, onGenericChannelUpdate, onGenericCommandInteraction, onGenericComponentInteractionCreate, onGenericContextInteraction, onGenericEmoji, onGenericEmojiUpdate, onGenericEvent, onGenericGuild, onGenericGuildInvite, onGenericGuildMember, onGenericGuildMemberUpdate, onGenericGuildSticker, onGenericGuildStickerUpdate, onGenericGuildUpdate, onGenericGuildVoice, onGenericInteractionCreate, onGenericMessage, onGenericMessageReaction, onGenericPermissionOverride, onGenericPrivilegeUpdate, onGenericRole, onGenericRoleUpdate, onGenericSelfUpdate, onGenericStageInstance, onGenericStageInstanceUpdate, onGenericThread, onGenericThreadMember, onGenericUpdate, onGenericUser, onGenericUserPresence, onGuildAvailable, onGuildBan, onGuildInviteCreate, onGuildInviteDelete, onGuildJoin, onGuildLeave, onGuildMemberJoin, onGuildMemberRemove, onGuildMemberRoleAdd, onGuildMemberRoleRemove, onGuildMemberUpdate, onGuildMemberUpdateAvatar, onGuildMemberUpdateBoostTime, onGuildMemberUpdateNickname, onGuildMemberUpdatePending, onGuildMemberUpdateTimeOut, onGuildReady, onGuildStickerAdded, onGuildStickerRemoved, onGuildStickerUpdateAvailable, onGuildStickerUpdateDescription, onGuildStickerUpdateName, onGuildStickerUpdateTags, onGuildTimeout, onGuildUnavailable, onGuildUnban, onGuildUpdateAfkChannel, onGuildUpdateAfkTimeout, onGuildUpdateBanner, onGuildUpdateBoostCount, onGuildUpdateBoostTier, onGuildUpdateCommunityUpdatesChannel, onGuildUpdateDescription, onGuildUpdateExplicitContentLevel, onGuildUpdateFeatures, onGuildUpdateIcon, onGuildUpdateLocale, onGuildUpdateMaxMembers, onGuildUpdateMaxPresences, onGuildUpdateMFALevel, onGuildUpdateName, onGuildUpdateNotificationLevel, onGuildUpdateNSFWLevel, onGuildUpdateOwner, onGuildUpdateRulesChannel, onGuildUpdateSplash, onGuildUpdateSystemChannel, onGuildUpdateVanityCode, onGuildUpdateVerificationLevel, onGuildVoiceDeafen, onGuildVoiceGuildDeafen, onGuildVoiceGuildMute, onGuildVoiceJoin, onGuildVoiceLeave, onGuildVoiceMove, onGuildVoiceMute, onGuildVoiceRequestToSpeak, onGuildVoiceSelfDeafen, onGuildVoiceSelfMute, onGuildVoiceStream, onGuildVoiceSuppress, onGuildVoiceUpdate, onGuildVoiceVideo, onHttpRequest, onMessageBulkDelete, onMessageContextInteraction, onMessageDelete, onMessageEmbed, onMessageReactionAdd, onMessageReactionRemove, onMessageReactionRemoveAll, onMessageReactionRemoveEmoji, onModalInteraction, onPermissionOverrideCreate, onPermissionOverrideDelete, onPermissionOverrideUpdate, onRawGateway, onReady, onReconnected, onResumed, onRoleCreate, onRoleDelete, onRoleUpdateColor, onRoleUpdateHoisted, onRoleUpdateIcon, onRoleUpdateMentionable, onRoleUpdateName, onRoleUpdatePermissions, onRoleUpdatePosition, onSelfUpdateAvatar, onSelfUpdateMFA, onSelfUpdateName, onSelfUpdateVerified, onShutdown, onStageInstanceCreate, onStageInstanceDelete, onStageInstanceUpdatePrivacyLevel, onStageInstanceUpdateTopic, onStatusChange, onThreadHidden, onThreadMemberJoin, onThreadMemberLeave, onThreadRevealed, onUnavailableGuildJoined, onUnavailableGuildLeave, onUserActivityEnd, onUserActivityStart, onUserContextInteraction, onUserTyping, onUserUpdateActivities, onUserUpdateActivityOrder, onUserUpdateAvatar, onUserUpdateDiscriminator, onUserUpdateFlags, onUserUpdateName, onUserUpdateOnlineStatus

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ComplexCommandHandler

      public ComplexCommandHandler(boolean usePrefix)
  • Method Details

    • setPrefix

      public ComplexCommandHandler setPrefix(String prefix)
    • registerCommand

      public ComplexCommandHandler registerCommand(BaseCommand command)
    • setJda

      public void setJda(net.dv8tion.jda.api.JDA jda)
    • getRegisteredCommands

      public Map<String,BaseCommand> getRegisteredCommands()
    • checkMessageInteraction

      public void checkMessageInteraction(net.dv8tion.jda.api.entities.Message message)
    • destroyInteraction

      public void destroyInteraction(InteractiveArguments session)
    • onMessageReceived

      public void onMessageReceived(@NotNull @NotNull net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
      Overrides:
      onMessageReceived in class net.dv8tion.jda.api.hooks.ListenerAdapter
    • onMessageUpdate

      public void onMessageUpdate(@NotNull @NotNull net.dv8tion.jda.api.events.message.MessageUpdateEvent event)
      Overrides:
      onMessageUpdate in class net.dv8tion.jda.api.hooks.ListenerAdapter
    • onSlashCommandInteraction

      public void onSlashCommandInteraction(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event)
      Overrides:
      onSlashCommandInteraction in class net.dv8tion.jda.api.hooks.ListenerAdapter
    • onCommandAutoCompleteInteraction

      public void onCommandAutoCompleteInteraction(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent event)
      Overrides:
      onCommandAutoCompleteInteraction in class net.dv8tion.jda.api.hooks.ListenerAdapter
    • onButtonInteraction

      public void onButtonInteraction(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent event)
      Overrides:
      onButtonInteraction in class net.dv8tion.jda.api.hooks.ListenerAdapter
    • onSelectMenuInteraction

      public void onSelectMenuInteraction(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.component.SelectMenuInteractionEvent event)
      Overrides:
      onSelectMenuInteraction in class net.dv8tion.jda.api.hooks.ListenerAdapter
    • downsert

      public void downsert(@Nullable net.dv8tion.jda.api.entities.Guild guild)
      Delete and create commands.
    • deployAll

      public void deployAll(@Nullable net.dv8tion.jda.api.entities.Guild guild)
    • deploy

      @Deprecated public void deploy(@Nullable net.dv8tion.jda.api.entities.Guild guild)
      Deprecated.
      Downsert, then upsert commands.