Package discord4j.core.event
Class ReactiveEventAdapter
- java.lang.Object
-
- discord4j.core.event.ReactiveEventAdapter
-
-
Constructor Summary
Constructors Constructor Description ReactiveEventAdapter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReactiveEventAdapter
from(ReactiveEventAdapter... adapters)
Create a compositeReactiveEventAdapter
from multiple adapters.Publisher<?>
hookOnEvent(Event event)
Publisher<?>
onApplicationCommandCreate(ApplicationCommandCreateEvent event)
Invoked when an application command relevant to the current user is created.Publisher<?>
onApplicationCommandDelete(ApplicationCommandDeleteEvent event)
Invoked when an application command relevant to the current user is deleted.Publisher<?>
onApplicationCommandInteraction(ApplicationCommandInteractionEvent event)
Invoked when a user starts an application command interaction.Publisher<?>
onApplicationCommandUpdate(ApplicationCommandUpdateEvent event)
Invoked when an application command relevant to the current user is updated.Publisher<?>
onAutoCompleteInteraction(AutoCompleteInteractionEvent event)
Invoked when a user starts an auto-complete interaction.Publisher<?>
onBan(BanEvent event)
Invoked when a user is banned from a guild.Publisher<?>
onButtonInteraction(ButtonInteractionEvent event)
Invoked when a user interacts with a button component.Publisher<?>
onCategoryCreate(CategoryCreateEvent event)
Invoked when a guild channel category is created.Publisher<?>
onCategoryDelete(CategoryDeleteEvent event)
Invoked when a guild channel category is deleted.Publisher<?>
onCategoryUpdate(CategoryUpdateEvent event)
Invoked when a guild channel category is updated.Publisher<?>
onChatInputAutoCompleteInteraction(ChatInputAutoCompleteEvent event)
Invoked when a user is typing a chat input command option that has auto-complete enabled.Publisher<?>
onChatInputInteraction(ChatInputInteractionEvent event)
Invoked when a user issues a chat input command (formerly "slash command").Publisher<?>
onComponentInteraction(ComponentInteractionEvent event)
Invoked when a user interacts with a component.Publisher<?>
onConnect(ConnectEvent event)
Invoked when connecting to the Gateway for the first time only.Publisher<?>
onDeferrableInteraction(DeferrableInteractionEvent event)
Invoked when a user starts a deferrable interactionPublisher<?>
onDisconnect(DisconnectEvent event)
Invoked when the bot has disconnected from the Gateway.Publisher<?>
onEmojisUpdate(EmojisUpdateEvent event)
Invoked when an emoji is added, deleted or edited in a guild.Publisher<?>
onGuildCreate(GuildCreateEvent event)
Invoked when the bot receives initial information on startup, after it joins a guild, or after an outage is resolved.Publisher<?>
onGuildDelete(GuildDeleteEvent event)
Invoked when the bot leaves or is kicked from a guild, or if a guild has become unavailable due to an outage.Publisher<?>
onGuildUpdate(GuildUpdateEvent event)
Invoked when a guild is updated.Publisher<?>
onIntegrationCreate(IntegrationCreateEvent event)
Invoked when an integration has been created.Publisher<?>
onIntegrationDelete(IntegrationDeleteEvent event)
Invoked when an integration has been deleted.Publisher<?>
onIntegrationsUpdate(IntegrationsUpdateEvent event)
Invoked when guild integrations are updated.Publisher<?>
onIntegrationUpdate(IntegrationUpdateEvent event)
Invoked when an integration has been updated.Publisher<?>
onInteractionCreate(InteractionCreateEvent event)
Invoked when a user starts an interaction.Publisher<?>
onInviteCreate(InviteCreateEvent event)
Invoked when an invite to a channel is created.Publisher<?>
onInviteDelete(InviteDeleteEvent event)
Invoked when an invite to a channel has expired.Publisher<?>
onMemberChunk(MemberChunkEvent event)
Invoked when members are streamed to the client from Discord.Publisher<?>
onMemberJoin(MemberJoinEvent event)
Invoked when a user joins a guild.Publisher<?>
onMemberLeave(MemberLeaveEvent event)
Invoked when a user leaves a guild, or is kicked from it.Publisher<?>
onMemberUpdate(MemberUpdateEvent event)
Invoked when a user's nickname or roles change in a guild.Publisher<?>
onMessageBulkDelete(MessageBulkDeleteEvent event)
Invoked when multiple messages are deleted at once.Publisher<?>
onMessageCreate(MessageCreateEvent event)
Invoked when a message is sent in a message channel.Publisher<?>
onMessageDelete(MessageDeleteEvent event)
Invoked when a message is deleted.Publisher<?>
onMessageInteraction(MessageInteractionEvent event)
Invoked when a user issues a message command (context menu action on a message).Publisher<?>
onMessageUpdate(MessageUpdateEvent event)
Invoked when a message is updated.Publisher<?>
onNewsChannelCreate(NewsChannelCreateEvent event)
Invoked when a guild news channel is created.Publisher<?>
onNewsChannelDelete(NewsChannelDeleteEvent event)
Invoked when a guild news channel is deleted.Publisher<?>
onNewsChannelUpdate(NewsChannelUpdateEvent event)
Invoked when a guild news channel is updated.Publisher<?>
onPinsUpdate(PinsUpdateEvent event)
Invoked when a channel's pinned messages are updated.Publisher<?>
onPresenceUpdate(PresenceUpdateEvent event)
Invoked when a user's presence or status has changed.Publisher<?>
onReactionAdd(ReactionAddEvent event)
Invoked when a reaction is added to a message.Publisher<?>
onReactionRemove(ReactionRemoveEvent event)
Invoked when a reaction is removed from a message.Publisher<?>
onReactionRemoveAll(ReactionRemoveAllEvent event)
Invoked when all of the reactions on a message are removed.Publisher<?>
onReactionRemoveEmoji(ReactionRemoveEmojiEvent event)
Invoked when the reactions for one emoji are removed from a message.Publisher<?>
onReady(ReadyEvent event)
Invoked as Discord has established a fresh Gateway session.Publisher<?>
onReconnect(ReconnectEvent event)
Invoked when subsequent reconnections to the Gateway, either through resumption or full retry.Publisher<?>
onReconnectFail(ReconnectFailEvent event)
Invoked when a resumption or reconnection attempt has failed but can be retried.Publisher<?>
onReconnectStart(ReconnectStartEvent event)
Invoked when a resumption or reconnection attempt has begun.Publisher<?>
onResume(ResumeEvent event)
Invoked when the gateway connection is successfully resumed.Publisher<?>
onRoleCreate(RoleCreateEvent event)
Invoked when a role is created in a guild.Publisher<?>
onRoleDelete(RoleDeleteEvent event)
Invoked when a role is deleted from a guild.Publisher<?>
onRoleUpdate(RoleUpdateEvent event)
Invoked when one or more role's properties are updated in a guild.Publisher<?>
onSelectMenuInteraction(SelectMenuInteractionEvent event)
Invoked when a user interacts with a select menu.Publisher<?>
onSessionInvalidated(SessionInvalidatedEvent event)
Invoked when a gateway session has been invalidated.Publisher<?>
onStoreChannelCreate(StoreChannelCreateEvent event)
Invoked when a guild store channel is created.Publisher<?>
onStoreChannelDelete(StoreChannelDeleteEvent event)
Invoked when a guild store channel is deleted.Publisher<?>
onStoreChannelUpdate(StoreChannelUpdateEvent event)
Invoked when a guild store channel is updated.Publisher<?>
onTextChannelCreate(TextChannelCreateEvent event)
Invoked when a guild text channel is created.Publisher<?>
onTextChannelDelete(TextChannelDeleteEvent event)
Invoked when a guild text channel is deleted.Publisher<?>
onTextChannelUpdate(TextChannelUpdateEvent event)
Invoked when a guild text channel is updated.Publisher<?>
onTypingStart(TypingStartEvent event)
Invoked when a user has started typing a message.Publisher<?>
onUnban(UnbanEvent event)
Invoked when a user is unbanned from a guild.Publisher<?>
onUserInteraction(UserInteractionEvent event)
Invoked when a user issues a user command (context menu action on a user).Publisher<?>
onUserUpdate(UserUpdateEvent event)
Invoked when one or more user's properties were updated.Publisher<?>
onVoiceChannelCreate(VoiceChannelCreateEvent event)
Invoked when a guild voice channel is created.Publisher<?>
onVoiceChannelDelete(VoiceChannelDeleteEvent event)
Invoked when a guild voice channel is deleted.Publisher<?>
onVoiceChannelUpdate(VoiceChannelUpdateEvent event)
Invoked when a guild voice channel is updated.Publisher<?>
onVoiceServerUpdate(VoiceServerUpdateEvent event)
Invoked when a guild's voice server is requested or is updated.Publisher<?>
onVoiceStateUpdate(VoiceStateUpdateEvent event)
Invoked when a user's connected voice channel and status, was requested or has updated.Publisher<?>
onWebhooksUpdate(WebhooksUpdateEvent event)
Invoked when a webhook is updated in a guild.
-
-
-
Method Detail
-
onReady
public Publisher<?> onReady(ReadyEvent event)
Invoked as Discord has established a fresh Gateway session. This event can be used to track the bot connection details and contains the initial state required to operate with the real-time Gateway. SeeReadyEvent
and Discord documentation for more details about this event.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onResume
public Publisher<?> onResume(ResumeEvent event)
Invoked when the gateway connection is successfully resumed.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMessageCreate
public Publisher<?> onMessageCreate(MessageCreateEvent event)
Invoked when a message is sent in a message channel.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMessageDelete
public Publisher<?> onMessageDelete(MessageDeleteEvent event)
Invoked when a message is deleted.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMessageUpdate
public Publisher<?> onMessageUpdate(MessageUpdateEvent event)
Invoked when a message is updated. This event includes both normal message editing as well as the following behavior regarding embeds: When a message with a link is sent, it does not initially contain its embed. When Discord creates the embed, this event is fired with it added to the embeds list.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMessageBulkDelete
public Publisher<?> onMessageBulkDelete(MessageBulkDeleteEvent event)
Invoked when multiple messages are deleted at once.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onReactionAdd
public Publisher<?> onReactionAdd(ReactionAddEvent event)
Invoked when a reaction is added to a message. Guild ID might be missing if this event fires for a DM channel.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onReactionRemove
public Publisher<?> onReactionRemove(ReactionRemoveEvent event)
Invoked when a reaction is removed from a message. Guild ID might be missing if this event fires for a DM channel.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onReactionRemoveEmoji
public Publisher<?> onReactionRemoveEmoji(ReactionRemoveEmojiEvent event)
Invoked when the reactions for one emoji are removed from a message. Guild ID might be missing if this event fires for a DM channel.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onReactionRemoveAll
public Publisher<?> onReactionRemoveAll(ReactionRemoveAllEvent event)
Invoked when all of the reactions on a message are removed. Guild ID might be missing if this event fires for a DM channel.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onApplicationCommandCreate
public Publisher<?> onApplicationCommandCreate(ApplicationCommandCreateEvent event)
Invoked when an application command relevant to the current user is created. Guild ID might be missing if this event fires for a DM channel.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onApplicationCommandUpdate
public Publisher<?> onApplicationCommandUpdate(ApplicationCommandUpdateEvent event)
Invoked when an application command relevant to the current user is updated. Guild ID might be missing if this event fires for a DM channel.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onApplicationCommandDelete
public Publisher<?> onApplicationCommandDelete(ApplicationCommandDeleteEvent event)
Invoked when an application command relevant to the current user is deleted. Guild ID might be missing if this event fires for a DM channel.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onGuildCreate
public Publisher<?> onGuildCreate(GuildCreateEvent event)
Invoked when the bot receives initial information on startup, after it joins a guild, or after an outage is resolved.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onGuildDelete
public Publisher<?> onGuildDelete(GuildDeleteEvent event)
Invoked when the bot leaves or is kicked from a guild, or if a guild has become unavailable due to an outage.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onGuildUpdate
public Publisher<?> onGuildUpdate(GuildUpdateEvent event)
Invoked when a guild is updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMemberJoin
public Publisher<?> onMemberJoin(MemberJoinEvent event)
Invoked when a user joins a guild.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMemberLeave
public Publisher<?> onMemberLeave(MemberLeaveEvent event)
Invoked when a user leaves a guild, or is kicked from it.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMemberUpdate
public Publisher<?> onMemberUpdate(MemberUpdateEvent event)
Invoked when a user's nickname or roles change in a guild.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMemberChunk
public Publisher<?> onMemberChunk(MemberChunkEvent event)
Invoked when members are streamed to the client from Discord.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onEmojisUpdate
public Publisher<?> onEmojisUpdate(EmojisUpdateEvent event)
Invoked when an emoji is added, deleted or edited in a guild. The emojis set includes ALL emojis of the guild.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onBan
public Publisher<?> onBan(BanEvent event)
Invoked when a user is banned from a guild.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onUnban
public Publisher<?> onUnban(UnbanEvent event)
Invoked when a user is unbanned from a guild.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onIntegrationsUpdate
public Publisher<?> onIntegrationsUpdate(IntegrationsUpdateEvent event)
Invoked when guild integrations are updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onWebhooksUpdate
public Publisher<?> onWebhooksUpdate(WebhooksUpdateEvent event)
Invoked when a webhook is updated in a guild. Discord does not send any information about what was actually updated. This is simply a notification of some update.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onTextChannelCreate
public Publisher<?> onTextChannelCreate(TextChannelCreateEvent event)
Invoked when a guild text channel is created.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onTextChannelDelete
public Publisher<?> onTextChannelDelete(TextChannelDeleteEvent event)
Invoked when a guild text channel is deleted.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onTextChannelUpdate
public Publisher<?> onTextChannelUpdate(TextChannelUpdateEvent event)
Invoked when a guild text channel is updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onVoiceChannelCreate
public Publisher<?> onVoiceChannelCreate(VoiceChannelCreateEvent event)
Invoked when a guild voice channel is created.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onVoiceChannelDelete
public Publisher<?> onVoiceChannelDelete(VoiceChannelDeleteEvent event)
Invoked when a guild voice channel is deleted.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onVoiceChannelUpdate
public Publisher<?> onVoiceChannelUpdate(VoiceChannelUpdateEvent event)
Invoked when a guild voice channel is updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onCategoryCreate
public Publisher<?> onCategoryCreate(CategoryCreateEvent event)
Invoked when a guild channel category is created.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onCategoryDelete
public Publisher<?> onCategoryDelete(CategoryDeleteEvent event)
Invoked when a guild channel category is deleted.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onCategoryUpdate
public Publisher<?> onCategoryUpdate(CategoryUpdateEvent event)
Invoked when a guild channel category is updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onNewsChannelCreate
public Publisher<?> onNewsChannelCreate(NewsChannelCreateEvent event)
Invoked when a guild news channel is created.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onNewsChannelDelete
public Publisher<?> onNewsChannelDelete(NewsChannelDeleteEvent event)
Invoked when a guild news channel is deleted.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onNewsChannelUpdate
public Publisher<?> onNewsChannelUpdate(NewsChannelUpdateEvent event)
Invoked when a guild news channel is updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onStoreChannelCreate
public Publisher<?> onStoreChannelCreate(StoreChannelCreateEvent event)
Invoked when a guild store channel is created.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onStoreChannelDelete
public Publisher<?> onStoreChannelDelete(StoreChannelDeleteEvent event)
Invoked when a guild store channel is deleted.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onStoreChannelUpdate
public Publisher<?> onStoreChannelUpdate(StoreChannelUpdateEvent event)
Invoked when a guild store channel is updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onTypingStart
public Publisher<?> onTypingStart(TypingStartEvent event)
Invoked when a user has started typing a message.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onPinsUpdate
public Publisher<?> onPinsUpdate(PinsUpdateEvent event)
Invoked when a channel's pinned messages are updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onRoleCreate
public Publisher<?> onRoleCreate(RoleCreateEvent event)
Invoked when a role is created in a guild.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onRoleDelete
public Publisher<?> onRoleDelete(RoleDeleteEvent event)
Invoked when a role is deleted from a guild.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onRoleUpdate
public Publisher<?> onRoleUpdate(RoleUpdateEvent event)
Invoked when one or more role's properties are updated in a guild.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onInviteCreate
public Publisher<?> onInviteCreate(InviteCreateEvent event)
Invoked when an invite to a channel is created.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onInviteDelete
public Publisher<?> onInviteDelete(InviteDeleteEvent event)
Invoked when an invite to a channel has expired.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onUserUpdate
public Publisher<?> onUserUpdate(UserUpdateEvent event)
Invoked when one or more user's properties were updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onPresenceUpdate
public Publisher<?> onPresenceUpdate(PresenceUpdateEvent event)
Invoked when a user's presence or status has changed.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onVoiceStateUpdate
public Publisher<?> onVoiceStateUpdate(VoiceStateUpdateEvent event)
Invoked when a user's connected voice channel and status, was requested or has updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onVoiceServerUpdate
public Publisher<?> onVoiceServerUpdate(VoiceServerUpdateEvent event)
Invoked when a guild's voice server is requested or is updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onConnect
public Publisher<?> onConnect(ConnectEvent event)
Invoked when connecting to the Gateway for the first time only.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onReconnect
public Publisher<?> onReconnect(ReconnectEvent event)
Invoked when subsequent reconnections to the Gateway, either through resumption or full retry.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onDisconnect
public Publisher<?> onDisconnect(DisconnectEvent event)
Invoked when the bot has disconnected from the Gateway.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onReconnectStart
public Publisher<?> onReconnectStart(ReconnectStartEvent event)
Invoked when a resumption or reconnection attempt has begun.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onReconnectFail
public Publisher<?> onReconnectFail(ReconnectFailEvent event)
Invoked when a resumption or reconnection attempt has failed but can be retried.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onSessionInvalidated
public Publisher<?> onSessionInvalidated(SessionInvalidatedEvent event)
Invoked when a gateway session has been invalidated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onInteractionCreate
public Publisher<?> onInteractionCreate(InteractionCreateEvent event)
Invoked when a user starts an interaction.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onDeferrableInteraction
public Publisher<?> onDeferrableInteraction(DeferrableInteractionEvent event)
Invoked when a user starts a deferrable interaction- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onApplicationCommandInteraction
public Publisher<?> onApplicationCommandInteraction(ApplicationCommandInteractionEvent event)
Invoked when a user starts an application command interaction.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onChatInputInteraction
public Publisher<?> onChatInputInteraction(ChatInputInteractionEvent event)
Invoked when a user issues a chat input command (formerly "slash command").- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onMessageInteraction
public Publisher<?> onMessageInteraction(MessageInteractionEvent event)
Invoked when a user issues a message command (context menu action on a message).- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onUserInteraction
public Publisher<?> onUserInteraction(UserInteractionEvent event)
Invoked when a user issues a user command (context menu action on a user).- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onComponentInteraction
public Publisher<?> onComponentInteraction(ComponentInteractionEvent event)
Invoked when a user interacts with a component.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onButtonInteraction
public Publisher<?> onButtonInteraction(ButtonInteractionEvent event)
Invoked when a user interacts with a button component.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onSelectMenuInteraction
public Publisher<?> onSelectMenuInteraction(SelectMenuInteractionEvent event)
Invoked when a user interacts with a select menu.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onAutoCompleteInteraction
public Publisher<?> onAutoCompleteInteraction(AutoCompleteInteractionEvent event)
Invoked when a user starts an auto-complete interaction.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onChatInputAutoCompleteInteraction
public Publisher<?> onChatInputAutoCompleteInteraction(ChatInputAutoCompleteEvent event)
Invoked when a user is typing a chat input command option that has auto-complete enabled.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onIntegrationCreate
public Publisher<?> onIntegrationCreate(IntegrationCreateEvent event)
Invoked when an integration has been created.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onIntegrationUpdate
public Publisher<?> onIntegrationUpdate(IntegrationUpdateEvent event)
Invoked when an integration has been updated.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
onIntegrationDelete
public Publisher<?> onIntegrationDelete(IntegrationDeleteEvent event)
Invoked when an integration has been deleted.- Parameters:
event
- the event instance- Returns:
- a
Publisher
that completes when this listener has done processing the event, for example, returning anyMono
,Flux
or synchronous code usingMono.fromRunnable(Runnable)
.
-
from
public static ReactiveEventAdapter from(ReactiveEventAdapter... adapters)
Create a compositeReactiveEventAdapter
from multiple adapters.- Parameters:
adapters
- an array of adapters to combine- Returns:
- a composite adapter
-
-