Package tech.xigam.cch
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 -
Constructor Summary
ConstructorsConstructorDescriptionComplexCommandHandler(boolean usePrefix) This constructor should be called inJDABuilder.addEventListeners(java.lang.Object...) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckMessageInteraction(net.dv8tion.jda.api.entities.Message message) voiddeploy(net.dv8tion.jda.api.entities.Guild guild) Deprecated.voiddeployAll(net.dv8tion.jda.api.entities.Guild guild) voiddestroyInteraction(InteractiveArguments session) voiddownsert(net.dv8tion.jda.api.entities.Guild guild) Delete and create commands.voidonCommandAutoCompleteInteraction(@NotNull net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent event) voidonMessageReceived(@NotNull net.dv8tion.jda.api.events.message.MessageReceivedEvent event) voidonMessageUpdate(@NotNull net.dv8tion.jda.api.events.message.MessageUpdateEvent event) voidonSlashCommandInteraction(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event) registerCommand(BaseCommand command) voidsetJda(net.dv8tion.jda.api.JDA jda) Methods inherited from class net.dv8tion.jda.api.hooks.ListenerAdapter
onButtonInteraction, onChannelCreate, onChannelDelete, onChannelUpdateArchived, onChannelUpdateArchiveTimestamp, onChannelUpdateAutoArchiveDuration, onChannelUpdateBitrate, onChannelUpdateInvitable, onChannelUpdateLocked, onChannelUpdateName, onChannelUpdateNSFW, onChannelUpdateParent, onChannelUpdatePosition, onChannelUpdateRegion, onChannelUpdateSlowmode, onChannelUpdateTopic, onChannelUpdateType, onChannelUpdateUserLimit, onDisconnect, onEmoteAdded, onEmoteRemoved, onEmoteUpdateName, onEmoteUpdateRoles, onEvent, onException, onGatewayPing, onGenericAutoCompleteInteraction, onGenericChannel, onGenericChannelUpdate, onGenericCommandInteraction, onGenericComponentInteractionCreate, onGenericContextInteraction, onGenericEmote, onGenericEmoteUpdate, onGenericEvent, onGenericGuild, onGenericGuildInvite, onGenericGuildMember, onGenericGuildMemberUpdate, onGenericGuildUpdate, onGenericGuildVoice, onGenericInteractionCreate, onGenericMessage, onGenericMessageReaction, onGenericPermissionOverride, 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, 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, onMessageReactionRemoveEmote, onPermissionOverrideCreate, onPermissionOverrideDelete, onPermissionOverrideUpdate, onRawGateway, onReady, onReconnected, onResumed, onRoleCreate, onRoleDelete, onRoleUpdateColor, onRoleUpdateHoisted, onRoleUpdateIcon, onRoleUpdateMentionable, onRoleUpdateName, onRoleUpdatePermissions, onRoleUpdatePosition, onSelectMenuInteraction, 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
-
Field Details
-
onArgumentError
-
-
Constructor Details
-
ComplexCommandHandler
public ComplexCommandHandler(boolean usePrefix) This constructor should be called inJDABuilder.addEventListeners(java.lang.Object...)
-
-
Method Details
-
setPrefix
-
registerCommand
-
setJda
public void setJda(net.dv8tion.jda.api.JDA jda) -
checkMessageInteraction
public void checkMessageInteraction(net.dv8tion.jda.api.entities.Message message) -
destroyInteraction
-
onMessageReceived
public void onMessageReceived(@NotNull @NotNull net.dv8tion.jda.api.events.message.MessageReceivedEvent event) - Overrides:
onMessageReceivedin classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
onMessageUpdate
public void onMessageUpdate(@NotNull @NotNull net.dv8tion.jda.api.events.message.MessageUpdateEvent event) - Overrides:
onMessageUpdatein classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
onSlashCommandInteraction
public void onSlashCommandInteraction(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event) - Overrides:
onSlashCommandInteractionin classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
onCommandAutoCompleteInteraction
public void onCommandAutoCompleteInteraction(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent event) - Overrides:
onCommandAutoCompleteInteractionin classnet.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.Downsert, then upsert commands.
-