Package dev.mlnr.blh.jda
Class BLHJDAListener
- java.lang.Object
-
- net.dv8tion.jda.api.hooks.ListenerAdapter
-
- dev.mlnr.blh.jda.BLHJDAListener
-
- All Implemented Interfaces:
net.dv8tion.jda.api.hooks.EventListener
public class BLHJDAListener extends net.dv8tion.jda.api.hooks.ListenerAdapterA 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 voidonGuildJoin(net.dv8tion.jda.api.events.guild.GuildJoinEvent event)voidonGuildLeave(net.dv8tion.jda.api.events.guild.GuildLeaveEvent event)voidonReady(net.dv8tion.jda.api.events.ReadyEvent event)voidonUnavailableGuildJoined(net.dv8tion.jda.api.events.guild.UnavailableGuildJoinedEvent event)voidonUnavailableGuildLeave(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
-
-
-
-
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 theJDABuilder#addEventListenersmethod.- Parameters:
botListHandler- TheBotListHandlerinstance built by aBLHBuilder- Throws:
java.lang.IllegalArgumentException- If the providedBotListHandlerinstance isnulljava.lang.IllegalStateException- If the providedBotListHandlerinstance uses autoposting
-
-
Method Detail
-
onReady
public void onReady(net.dv8tion.jda.api.events.ReadyEvent event)
- Overrides:
onReadyin classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
onGuildJoin
public void onGuildJoin(net.dv8tion.jda.api.events.guild.GuildJoinEvent event)
- Overrides:
onGuildJoinin classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
onGuildLeave
public void onGuildLeave(net.dv8tion.jda.api.events.guild.GuildLeaveEvent event)
- Overrides:
onGuildLeavein classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
onUnavailableGuildJoined
public void onUnavailableGuildJoined(net.dv8tion.jda.api.events.guild.UnavailableGuildJoinedEvent event)
- Overrides:
onUnavailableGuildJoinedin classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
onUnavailableGuildLeave
public void onUnavailableGuildLeave(net.dv8tion.jda.api.events.guild.UnavailableGuildLeaveEvent event)
- Overrides:
onUnavailableGuildLeavein classnet.dv8tion.jda.api.hooks.ListenerAdapter
-
-