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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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
    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
    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
    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
    void
    onMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
    Runs when a message is received in the channel the bot is watching
    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
    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
    void
    onReady(net.dv8tion.jda.api.events.session.ReadyEvent event)
    Runs when the bot is ready for use
    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
    void
    onSlashCommandInteraction(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event)
    Runs when someone runs a command in the channel the bot is watching
    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
    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

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 class net.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 event
      message - The JDA Message
      author - The author of the message
      text - 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 class net.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 event
      message - The JDA Message
      author - The author of the message
      text - 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 event
      message - The JDA Message
      author - The author of the message
      text - 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 event
      message - The JDA Message
      author - The author of the message
      text - 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 event
      message - The JDA Message
      author - The author of the message
      text - 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 event
      message - The JDA Message
      author - The author of the message
      text - 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 event
      message - The JDA Message
      author - The author of the message
      text - 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 event
      message - The JDA Message
      author - The author of the message
      text - 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 event
      message - The JDA Message
      author - The author of the message
      text - 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 event
      message - The JDA Message
      author - The author of the message
      text - 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 class net.dv8tion.jda.api.hooks.ListenerAdapter
      Parameters:
      event - The JDA message event