Class BLHJDAListener

  • All Implemented Interfaces:
    net.dv8tion.jda.api.hooks.EventListener

    public class BLHJDAListener
    extends net.dv8tion.jda.api.hooks.ListenerAdapter
    A JDA listener which is used to update the bot's stats when the bot is ready or joins or leaves a guild.
    • Constructor Summary

      Constructors 
      Constructor Description
      BLHJDAListener​(dev.mlnr.blh.core.api.BotListHandler botListHandler)
      Constructs a new event listener used to update the bot's stats.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onGuildJoin​(net.dv8tion.jda.api.events.guild.GuildJoinEvent event)  
      void onGuildLeave​(net.dv8tion.jda.api.events.guild.GuildLeaveEvent event)  
      void onReady​(net.dv8tion.jda.api.events.ReadyEvent event)  
      void onUnavailableGuildJoined​(net.dv8tion.jda.api.events.guild.UnavailableGuildJoinedEvent event)  
      void onUnavailableGuildLeave​(net.dv8tion.jda.api.events.guild.UnavailableGuildLeaveEvent event)  
      • Methods inherited from class net.dv8tion.jda.api.hooks.ListenerAdapter

        onCategoryCreate, onCategoryDelete, onCategoryUpdateName, onCategoryUpdatePermissions, onCategoryUpdatePosition, onDisconnect, onEmoteAdded, onEmoteRemoved, onEmoteUpdateName, onEmoteUpdateRoles, onEvent, onException, onGatewayPing, onGenericCategory, onGenericCategoryUpdate, onGenericEmote, onGenericEmoteUpdate, onGenericEvent, onGenericGuild, onGenericGuildInvite, onGenericGuildMember, onGenericGuildMemberUpdate, onGenericGuildMessage, onGenericGuildMessageReaction, onGenericGuildUpdate, onGenericGuildVoice, onGenericMessage, onGenericMessageReaction, onGenericPermissionOverride, onGenericPrivateMessage, onGenericPrivateMessageReaction, onGenericRole, onGenericRoleUpdate, onGenericSelfUpdate, onGenericStoreChannel, onGenericStoreChannelUpdate, onGenericTextChannel, onGenericTextChannelUpdate, onGenericUpdate, onGenericUser, onGenericUserPresence, onGenericVoiceChannel, onGenericVoiceChannelUpdate, onGuildAvailable, onGuildBan, onGuildInviteCreate, onGuildInviteDelete, 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, onMessageReceived, onMessageUpdate, onPermissionOverrideCreate, onPermissionOverrideDelete, onPermissionOverrideUpdate, onPrivateChannelCreate, onPrivateChannelDelete, onPrivateMessageDelete, onPrivateMessageEmbed, onPrivateMessageReactionAdd, onPrivateMessageReactionRemove, onPrivateMessageReceived, onPrivateMessageUpdate, onRawGateway, onReconnect, onReconnected, onResume, onResumed, onRoleCreate, onRoleDelete, onRoleUpdateColor, onRoleUpdateHoisted, onRoleUpdateMentionable, onRoleUpdateName, onRoleUpdatePermissions, onRoleUpdatePosition, onSelfUpdateAvatar, onSelfUpdateEmail, onSelfUpdateMFA, onSelfUpdateName, onSelfUpdateVerified, onShutdown, onStatusChange, onStoreChannelCreate, onStoreChannelDelete, onStoreChannelUpdateName, onStoreChannelUpdatePermissions, onStoreChannelUpdatePosition, onTextChannelCreate, onTextChannelDelete, onTextChannelUpdateName, onTextChannelUpdateNews, onTextChannelUpdateNSFW, onTextChannelUpdateParent, onTextChannelUpdatePermissions, onTextChannelUpdatePosition, onTextChannelUpdateSlowmode, onTextChannelUpdateTopic, onUserActivityEnd, onUserActivityStart, onUserTyping, onUserUpdateActivities, onUserUpdateActivityOrder, onUserUpdateAvatar, onUserUpdateDiscriminator, onUserUpdateFlags, onUserUpdateName, onUserUpdateOnlineStatus, onVoiceChannelCreate, onVoiceChannelDelete, onVoiceChannelUpdateBitrate, onVoiceChannelUpdateName, onVoiceChannelUpdateParent, onVoiceChannelUpdatePermissions, onVoiceChannelUpdatePosition, onVoiceChannelUpdateUserLimit
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BLHJDAListener

        public BLHJDAListener​(@Nonnull
                              dev.mlnr.blh.core.api.BotListHandler botListHandler)
        Constructs a new event listener used to update the bot's stats.
        The stats will be updated when the bot joins/leaves a guild. Additionally, if you want to update the stats when the bot is ready, you need to register this listener using the JDABuilder#addEventListeners method.
        Parameters:
        botListHandler - The BotListHandler instance built by a BLHBuilder
        Throws:
        java.lang.IllegalArgumentException - If the provided BotListHandler instance is null
        java.lang.IllegalStateException - If the provided BotListHandler instance uses autoposting
    • Method Detail

      • onReady

        public void onReady​(net.dv8tion.jda.api.events.ReadyEvent event)
        Overrides:
        onReady in class net.dv8tion.jda.api.hooks.ListenerAdapter
      • onGuildJoin

        public void onGuildJoin​(net.dv8tion.jda.api.events.guild.GuildJoinEvent event)
        Overrides:
        onGuildJoin in class net.dv8tion.jda.api.hooks.ListenerAdapter
      • onGuildLeave

        public void onGuildLeave​(net.dv8tion.jda.api.events.guild.GuildLeaveEvent event)
        Overrides:
        onGuildLeave in class net.dv8tion.jda.api.hooks.ListenerAdapter
      • onUnavailableGuildJoined

        public void onUnavailableGuildJoined​(net.dv8tion.jda.api.events.guild.UnavailableGuildJoinedEvent event)
        Overrides:
        onUnavailableGuildJoined in class net.dv8tion.jda.api.hooks.ListenerAdapter
      • onUnavailableGuildLeave

        public void onUnavailableGuildLeave​(net.dv8tion.jda.api.events.guild.UnavailableGuildLeaveEvent event)
        Overrides:
        onUnavailableGuildLeave in class net.dv8tion.jda.api.hooks.ListenerAdapter