Class DiscordCommandListener
java.lang.Object
net.dv8tion.jda.api.hooks.ListenerAdapter
net.lucypoulton.squirtgun.discord.command.DiscordCommandListener
- All Implemented Interfaces:
net.dv8tion.jda.api.hooks.EventListener
public class DiscordCommandListener
extends net.dv8tion.jda.api.hooks.ListenerAdapter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onMessageReceived(@NotNull net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
void
registerCommand(net.lucypoulton.squirtgun.command.node.CommandNode<?> node, net.lucypoulton.squirtgun.format.FormatProvider formatProvider)
Registers a command, overwriting any nodes with the same name.Methods inherited from class net.dv8tion.jda.api.hooks.ListenerAdapter
onApplicationCommandCreate, onApplicationCommandDelete, onApplicationCommandUpdate, onButtonClick, onCategoryCreate, onCategoryDelete, onCategoryUpdateName, onCategoryUpdatePermissions, onCategoryUpdatePosition, onDisconnect, onEmoteAdded, onEmoteRemoved, onEmoteUpdateName, onEmoteUpdateRoles, onEvent, onException, onGatewayPing, onGenericApplicationCommand, onGenericCategory, onGenericCategoryUpdate, onGenericEmote, onGenericEmoteUpdate, onGenericEvent, onGenericGuild, onGenericGuildInvite, onGenericGuildMember, onGenericGuildMemberUpdate, onGenericGuildMessage, onGenericGuildMessageReaction, onGenericGuildUpdate, onGenericGuildVoice, onGenericInteractionCreate, onGenericMessage, onGenericMessageReaction, onGenericPermissionOverride, onGenericPrivateMessage, onGenericPrivateMessageReaction, onGenericRole, onGenericRoleUpdate, onGenericSelfUpdate, onGenericStoreChannel, onGenericStoreChannelUpdate, onGenericTextChannel, onGenericTextChannelUpdate, onGenericUpdate, onGenericUser, onGenericUserPresence, onGenericVoiceChannel, onGenericVoiceChannelUpdate, onGuildAvailable, onGuildBan, onGuildInviteCreate, onGuildInviteDelete, onGuildJoin, onGuildLeave, onGuildMemberJoin, onGuildMemberLeave, onGuildMemberRemove, onGuildMemberRoleAdd, onGuildMemberRoleRemove, onGuildMemberUpdate, onGuildMemberUpdateBoostTime, onGuildMemberUpdateNickname, onGuildMemberUpdatePending, onGuildMessageDelete, onGuildMessageEmbed, onGuildMessageReactionAdd, onGuildMessageReactionRemove, onGuildMessageReactionRemoveAll, onGuildMessageReactionRemoveEmote, onGuildMessageReceived, onGuildMessageUpdate, onGuildReady, onGuildTimeout, onGuildUnavailable, onGuildUnban, onGuildUpdateAfkChannel, onGuildUpdateAfkTimeout, onGuildUpdateBanner, onGuildUpdateBoostCount, onGuildUpdateBoostTier, onGuildUpdateCommunityUpdatesChannel, onGuildUpdateDescription, onGuildUpdateExplicitContentLevel, onGuildUpdateFeatures, onGuildUpdateIcon, onGuildUpdateLocale, onGuildUpdateMaxMembers, onGuildUpdateMaxPresences, onGuildUpdateMFALevel, onGuildUpdateName, onGuildUpdateNotificationLevel, onGuildUpdateOwner, onGuildUpdateRegion, onGuildUpdateRulesChannel, onGuildUpdateSplash, onGuildUpdateSystemChannel, onGuildUpdateVanityCode, onGuildUpdateVerificationLevel, onGuildVoiceDeafen, onGuildVoiceGuildDeafen, onGuildVoiceGuildMute, onGuildVoiceJoin, onGuildVoiceLeave, onGuildVoiceMove, onGuildVoiceMute, onGuildVoiceSelfDeafen, onGuildVoiceSelfMute, onGuildVoiceStream, onGuildVoiceSuppress, onGuildVoiceUpdate, onHttpRequest, onMessageBulkDelete, onMessageDelete, onMessageEmbed, onMessageReactionAdd, onMessageReactionRemove, onMessageReactionRemoveAll, onMessageReactionRemoveEmote, onMessageUpdate, onPermissionOverrideCreate, onPermissionOverrideDelete, onPermissionOverrideUpdate, onPrivateChannelCreate, onPrivateChannelDelete, onPrivateMessageDelete, onPrivateMessageEmbed, onPrivateMessageReactionAdd, onPrivateMessageReactionRemove, onPrivateMessageReceived, onPrivateMessageUpdate, onRawGateway, onReady, onReconnect, onReconnected, onResume, onResumed, onRoleCreate, onRoleDelete, onRoleUpdateColor, onRoleUpdateHoisted, onRoleUpdateMentionable, onRoleUpdateName, onRoleUpdatePermissions, onRoleUpdatePosition, onSelfUpdateAvatar, onSelfUpdateMFA, onSelfUpdateName, onSelfUpdateVerified, onShutdown, onSlashCommand, onStatusChange, onStoreChannelCreate, onStoreChannelDelete, onStoreChannelUpdateName, onStoreChannelUpdatePermissions, onStoreChannelUpdatePosition, onTextChannelCreate, onTextChannelDelete, onTextChannelUpdateName, onTextChannelUpdateNews, onTextChannelUpdateNSFW, onTextChannelUpdateParent, onTextChannelUpdatePermissions, onTextChannelUpdatePosition, onTextChannelUpdateSlowmode, onTextChannelUpdateTopic, onUnavailableGuildJoined, onUnavailableGuildLeave, onUserActivityEnd, onUserActivityStart, onUserTyping, onUserUpdateActivities, onUserUpdateActivityOrder, onUserUpdateAvatar, onUserUpdateDiscriminator, onUserUpdateFlags, onUserUpdateName, onUserUpdateOnlineStatus, onVoiceChannelCreate, onVoiceChannelDelete, onVoiceChannelUpdateBitrate, onVoiceChannelUpdateName, onVoiceChannelUpdateParent, onVoiceChannelUpdatePermissions, onVoiceChannelUpdatePosition, onVoiceChannelUpdateRegion, onVoiceChannelUpdateUserLimit
-
Constructor Details
-
DiscordCommandListener
-
-
Method Details
-
registerCommand
public void registerCommand(net.lucypoulton.squirtgun.command.node.CommandNode<?> node, net.lucypoulton.squirtgun.format.FormatProvider formatProvider)Registers a command, overwriting any nodes with the same name.- Parameters:
node
- the command node to registerformatProvider
- the format provider to use for this node
-
onMessageReceived
public void onMessageReceived(@NotNull @NotNull net.dv8tion.jda.api.events.message.MessageReceivedEvent event)- Overrides:
onMessageReceived
in classnet.dv8tion.jda.api.hooks.ListenerAdapter
-