Class DiscordEventHandler
java.lang.Object
net.dv8tion.jda.api.hooks.ListenerAdapter
io.github.dexrnzacattack.rrdiscordbridge.discord.DiscordEventHandler
- All Implemented Interfaces:
net.dv8tion.jda.api.hooks.EventListener
public class DiscordEventHandler
extends net.dv8tion.jda.api.hooks.ListenerAdapter
Handles various Discord events from channels the bot listens to
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onConsoleChannelMessageReceived
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when someone sends a message in the console channelvoid
onForwardedMessage
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a message is forwarded to the relay channel the bot is watchingvoid
onMemberJoin
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a join message is sent to the relay channel the bot is watchingvoid
onMessage
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a normal message is sent to the relay channel the bot is watchingvoid
onMessagePinned
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a message is pinned in the relay channel the bot is watchingvoid
onMessageReceived
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event) Runs when a message is received in the channel the bot is watchingvoid
onPollCreated
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a poll is created in the relay channel the bot is watchingvoid
onPollEnded
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a poll has ended in the relay channel the bot is watchingvoid
onReady
(net.dv8tion.jda.api.events.session.ReadyEvent event) Runs when the bot is ready for usevoid
onServerBoost
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a server boost message is sent to the relay channel the bot is watchingvoid
onSlashCommandInteraction
(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event) Runs when someone runs a command in the channel the bot is watchingvoid
onThreadCreated
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a thread creation message is sent to the relay channel the bot is watchingvoid
onUserAppActivity
(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a user app/activity is run in the relay channel the bot is watchingMethods inherited from class net.dv8tion.jda.api.hooks.ListenerAdapter
onApplicationCommandUpdatePrivileges, onApplicationUpdatePrivileges, onAutoModExecution, onAutoModRuleCreate, onAutoModRuleDelete, onAutoModRuleUpdate, onButtonInteraction, onChannelCreate, onChannelDelete, onChannelUpdateAppliedTags, onChannelUpdateArchived, onChannelUpdateArchiveTimestamp, onChannelUpdateAutoArchiveDuration, onChannelUpdateBitrate, onChannelUpdateDefaultLayout, onChannelUpdateDefaultReaction, onChannelUpdateDefaultSortOrder, onChannelUpdateDefaultThreadSlowmode, onChannelUpdateFlags, onChannelUpdateInvitable, onChannelUpdateLocked, onChannelUpdateName, onChannelUpdateNSFW, onChannelUpdateParent, onChannelUpdatePosition, onChannelUpdateRegion, onChannelUpdateSlowmode, onChannelUpdateTopic, onChannelUpdateType, onChannelUpdateUserLimit, onChannelUpdateVoiceStatus, onCommandAutoCompleteInteraction, onEmojiAdded, onEmojiRemoved, onEmojiUpdateName, onEmojiUpdateRoles, onEntitlementCreate, onEntitlementDelete, onEntitlementUpdate, onEntitySelectInteraction, onEvent, onException, onForumTagAdd, onForumTagRemove, onForumTagUpdateEmoji, onForumTagUpdateModerated, onForumTagUpdateName, onGatewayPing, onGenericAutoCompleteInteraction, onGenericAutoModRule, onGenericChannel, onGenericChannelUpdate, onGenericCommandInteraction, onGenericComponentInteractionCreate, onGenericContextInteraction, onGenericEmoji, onGenericEmojiUpdate, onGenericEntitlement, onGenericEvent, onGenericForumTag, onGenericForumTagUpdate, onGenericGuild, onGenericGuildInvite, onGenericGuildMember, onGenericGuildMemberUpdate, onGenericGuildSticker, onGenericGuildStickerUpdate, onGenericGuildUpdate, onGenericGuildVoice, onGenericInteractionCreate, onGenericMessage, onGenericMessagePollVote, onGenericMessageReaction, onGenericPermissionOverride, onGenericPrivilegeUpdate, onGenericRole, onGenericRoleUpdate, onGenericScheduledEventGateway, onGenericScheduledEventUpdate, onGenericScheduledEventUser, onGenericSelectMenuInteraction, onGenericSelfUpdate, onGenericSession, onGenericStageInstance, onGenericStageInstanceUpdate, onGenericThread, onGenericThreadMember, onGenericUpdate, onGenericUser, onGenericUserPresence, onGenericUserUpdate, onGuildAuditLogEntryCreate, onGuildAvailable, onGuildBan, onGuildInviteCreate, onGuildInviteDelete, onGuildJoin, onGuildLeave, onGuildMemberJoin, onGuildMemberRemove, onGuildMemberRoleAdd, onGuildMemberRoleRemove, onGuildMemberUpdate, onGuildMemberUpdateAvatar, onGuildMemberUpdateBoostTime, onGuildMemberUpdateFlags, 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, onGuildUpdateSafetyAlertsChannel, onGuildUpdateSecurityIncidentActions, onGuildUpdateSecurityIncidentDetections, onGuildUpdateSplash, onGuildUpdateSystemChannel, onGuildUpdateVanityCode, onGuildUpdateVerificationLevel, onGuildVoiceDeafen, onGuildVoiceGuildDeafen, onGuildVoiceGuildMute, onGuildVoiceMute, onGuildVoiceRequestToSpeak, onGuildVoiceSelfDeafen, onGuildVoiceSelfMute, onGuildVoiceStream, onGuildVoiceSuppress, onGuildVoiceUpdate, onGuildVoiceVideo, onHttpRequest, onMessageBulkDelete, onMessageContextInteraction, onMessageDelete, onMessagePollVoteAdd, onMessagePollVoteRemove, onMessageReactionAdd, onMessageReactionRemove, onMessageReactionRemoveAll, onMessageReactionRemoveEmoji, onMessageUpdate, onModalInteraction, onPermissionOverrideCreate, onPermissionOverrideDelete, onPermissionOverrideUpdate, onRawGateway, onRoleCreate, onRoleDelete, onRoleUpdateColor, onRoleUpdateHoisted, onRoleUpdateIcon, onRoleUpdateMentionable, onRoleUpdateName, onRoleUpdatePermissions, onRoleUpdatePosition, onScheduledEventCreate, onScheduledEventDelete, onScheduledEventUpdateDescription, onScheduledEventUpdateEndTime, onScheduledEventUpdateImage, onScheduledEventUpdateLocation, onScheduledEventUpdateName, onScheduledEventUpdateStartTime, onScheduledEventUpdateStatus, onScheduledEventUserAdd, onScheduledEventUserRemove, onSelfUpdateAvatar, onSelfUpdateDiscriminator, onSelfUpdateGlobalName, onSelfUpdateMFA, onSelfUpdateName, onSelfUpdateVerified, onSessionDisconnect, onSessionInvalidate, onSessionRecreate, onSessionResume, onShutdown, onStageInstanceCreate, onStageInstanceDelete, onStageInstanceUpdatePrivacyLevel, onStageInstanceUpdateTopic, onStatusChange, onStringSelectInteraction, onThreadHidden, onThreadMemberJoin, onThreadMemberLeave, onThreadRevealed, onUnavailableGuildJoined, onUnavailableGuildLeave, onUserActivityEnd, onUserActivityStart, onUserContextInteraction, onUserTyping, onUserUpdateActivities, onUserUpdateActivityOrder, onUserUpdateAvatar, onUserUpdateDiscriminator, onUserUpdateFlags, onUserUpdateGlobalName, onUserUpdateName, onUserUpdateOnlineStatus
-
Constructor Details
-
DiscordEventHandler
public DiscordEventHandler()
-
-
Method Details
-
onReady
public void onReady(net.dv8tion.jda.api.events.session.ReadyEvent event) Runs when the bot is ready for use- Overrides:
onReady
in classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
onConsoleChannelMessageReceived
public void onConsoleChannelMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when someone sends a message in the console channel- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onSlashCommandInteraction
public void onSlashCommandInteraction(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event) Runs when someone runs a command in the channel the bot is watching- Overrides:
onSlashCommandInteraction
in classnet.dv8tion.jda.api.hooks.ListenerAdapter
- Parameters:
event
- The interaction event
-
onMemberJoin
public void onMemberJoin(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a join message is sent to the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onServerBoost
public void onServerBoost(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a server boost message is sent to the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onThreadCreated
public void onThreadCreated(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a thread creation message is sent to the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onMessagePinned
public void onMessagePinned(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a message is pinned in the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onPollEnded
public void onPollEnded(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a poll has ended in the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onUserAppActivity
public void onUserAppActivity(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a user app/activity is run in the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onForwardedMessage
public void onForwardedMessage(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a message is forwarded to the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onPollCreated
public void onPollCreated(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a poll is created in the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onMessage
public void onMessage(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, net.dv8tion.jda.api.entities.Message message, String author, String text) Runs when a normal message is sent to the relay channel the bot is watching- Parameters:
event
- The JDA message eventmessage
- The JDA Messageauthor
- The author of the messagetext
- The content of the message
-
onMessageReceived
public void onMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event) Runs when a message is received in the channel the bot is watching- Overrides:
onMessageReceived
in classnet.dv8tion.jda.api.hooks.ListenerAdapter
- Parameters:
event
- The JDA message event
-