public abstract class Event extends Object
These events are specifically sent by Discord as real-time payload.
ReadyEvent
: Discord has established a fresh Gateway sessionResumeEvent
: specifically sent after successful resumptionMessageCreateEvent
: a guild or DM message was createdMessageDeleteEvent
: a message was deletedMessageUpdateEvent
: a message's content was updatedMessageBulkDeleteEvent
: a batch of messages were deleted at onceReactionAddEvent
: a reaction was added to a messageReactionRemoveEvent
: a reaction was removed from a messageReactionRemoveEmojiEvent
: reactions for a given emoji were removed from a messageReactionRemoveAllEvent
: all reactions were removed from a messageGuildCreateEvent
: a startup event providing initial Guild
details, content depends on
Intent
configurationGuildDeleteEvent
: after being kicked from a guild, after leaving a guild or after a guild becoming
unavailable due to outageGuildUpdateEvent
: a guild has changed one or more propertiesMemberJoinEvent
: a user has joined a guildMemberLeaveEvent
: a user has left or was kicked from a guildMemberUpdateEvent
: a user had their nickname and/or roles changeMemberChunkEvent
: a batch of a guild's member detailsEmojisUpdateEvent
: a guild's emoji list was updatedBanEvent
: a user was banned from a guildUnbanEvent
: a user's ban was removed from a guildIntegrationsUpdateEvent
: a guild has updated their app integrationsWebhooksUpdateEvent
: a guild's webhooks were updatedTextChannelCreateEvent
, VoiceChannelCreateEvent
,
CategoryCreateEvent
, NewsChannelCreateEvent
, StoreChannelCreateEvent
TextChannelDeleteEvent
, VoiceChannelDeleteEvent
,
CategoryDeleteEvent
, NewsChannelDeleteEvent
, StoreChannelDeleteEvent
TextChannelUpdateEvent
, VoiceChannelUpdateEvent
,
CategoryUpdateEvent
, NewsChannelUpdateEvent
, StoreChannelUpdateEvent
TypingStartEvent
: as a user has started typing a messagePinsUpdateEvent
: a channel's pinned messages were updatedRoleCreateEvent
: a role was created in a guildRoleDeleteEvent
: a role was deleted from a guildRoleUpdateEvent
: one or more role's properties were updated in a guildInviteCreateEvent
: an invite to a channel was createdInviteDeleteEvent
: an invite to a channel has expiredUserUpdateEvent
: one or more user's properties were updatedPresenceUpdateEvent
: a user's presence or status has changedVoiceStateUpdateEvent
: a user's connected voice channel and status, was requested or has updatedVoiceServerUpdateEvent
: a guild's voice server was requested or has updatedThese events are derived by Discord4J according to the status of the websocket lifecycle.
ConnectEvent
: connected to the Gateway for the first time onlyReconnectEvent
: subsequent reconnections to the Gateway, either through resumption or full retryDisconnectEvent
: disconnected from the GatewayReconnectStartEvent
: a resumption or reconnection attempt has begunReconnectFailEvent
: a resumption or reconnection attempt has failed but can be retriedModifier | Constructor and Description |
---|---|
protected |
Event(GatewayDiscordClient gateway,
ShardInfo shardInfo) |
Modifier and Type | Method and Description |
---|---|
GatewayDiscordClient |
getClient()
Get the
GatewayDiscordClient that emitted this Event . |
ShardInfo |
getShardInfo()
Retrieve the shard details from this
Event . |
protected Event(GatewayDiscordClient gateway, ShardInfo shardInfo)
public GatewayDiscordClient getClient()
GatewayDiscordClient
that emitted this Event
.