Skip to content
FiveCord Docs

Gateway events

A Dispatch reports a change or command result through the Gateway. It has opcode 0, an event name, and a payload.

FieldTypeDescription
opintegerValue 0
tstringUppercase event name
sintegerNon-negative session sequence
danyPayload defined for the named event
{
"op": 0,
"t": "MESSAGE_CREATE",
"s": 17,
"d": { }
}

Ready establishes sequence 1. Live Dispatches advance it by one. Replayed Dispatches keep their original sequence and can have gaps. Resumed has the session’s current sequence without advancing it. The next live Dispatch has that sequence plus one. The sequence is local to one Gateway session and orders nothing across shards or HTTP operations.

Event filtering defines delivery by guild availability, channel visibility, permissions, and session settings. Account-scoped Dispatches go through only the session-level filters, which are the shard filter and the ignored_events list.

Most guild-scoped Dispatches have a guild_id string. Guild Create and Guild Sync identify the guild as id, and so does every Guild Delete other than the one the guild itself dispatches when the guild is deleted. Guild Counts Update and Channel Member Counts Update have no top-level guild_id, and each entry in their counts array has its own.

The originating session is excluded from a Dispatch only for Message Reaction Add and Message Reaction Remove in a guild channel, and only when the request supplied a session_id. That field is removed from the payload. The same field on a direct message or group direct message reaction is forwarded to every recipient unchanged and excludes nobody. The actor that issues any other mutation receives the resulting Dispatch like every other eligible session.

A Dispatch is buffered for Resume replay unless it is Guild Sync, Guild Member List Update, or Guild Members Chunk. Those are delivered live and never retained. A single oversized Dispatch is delivered but not retained, as Limits and rate limits describes. Ready and the guild burst that follows it for a bot session are also sent outside the replay buffer. The initial Call Create events are retained like any other Dispatch and are replayed on Resume.

EventDescriptionScope
ReadyThe initial session state after a successful IdentifySession lifecycle
ResumedRetained replay completes after a successful ResumeSession lifecycle
Sessions ReplaceThe account’s live session presence set is replacedCurrent user
Auth Session ChangeThe account’s authentication session is rotatedCurrent user
Rate LimitedA member request is refused by its budgetCommand response
User UpdateThe current user’s account record changesCurrent user
User Settings UpdateThe current user’s account-wide settings changeCurrent user
User Guild Settings UpdateOne guild notification record changesCurrent user
User Note UpdateThe current user writes or clears a private noteCurrent user
User Pinned DMs UpdateThe current user’s pinned private channel set is replacedCurrent user
User Connections UpdateThe current user’s external connection set is replacedCurrent user
WebAuthn Credentials UpdateThe current user’s WebAuthn credential set is replacedCurrent user
Relationship AddThe current user gains a relationshipCurrent user
Relationship UpdateOne of the current user’s relationships changesCurrent user
Relationship RemoveThe current user loses a relationshipCurrent user
Saved Message CreateThe current user saves a messageCurrent user
Saved Message DeleteThe current user unsaves a messageCurrent user
Recent Mention DeleteThe current user removes a recent mentionCurrent user
Favorite Meme CreateThe current user saves a memeCurrent user
Favorite Meme UpdateOne of the current user’s memes changesCurrent user
Favorite Meme DeleteThe current user deletes a memeCurrent user
Guild CreateA guild becomes available to the sessionGuild connection
Guild SyncA subscribed session receives the guild’s full current state againGuild connection
Guild UpdateA guild’s configuration changesGuild connection
Guild DeleteA guild leaves the session’s visibility or becomes unavailableGuild connection
Guild Role CreateA role is created in a guildGuild connection
Guild Role UpdateExactly one role record changesGuild connection
Guild Role Update BulkOne operation changes several role records togetherGuild connection
Guild Role DeleteA role is deleted from a guildGuild connection
Guild Emojis UpdateA guild’s emojis changeGuild connection
Guild Stickers UpdateA guild’s stickers changeGuild connection
Channel CreateA channel becomes visible to the sessionChannel visibility
Channel UpdateA visible channel changesChannel visibility
Channel Update BulkOne operation changes several channels togetherChannel visibility
Channel DeleteA channel leaves the session’s visibilityChannel visibility
Channel Recipient AddA user joins a group direct message the session belongs toPrivate channel
Channel Recipient RemoveA user leaves a group direct message the session belongs toPrivate channel
Webhooks UpdateThe webhook set of a viewable guild channel changesChannel visibility
Invite CreateAn invite is createdInvite audience
Invite DeleteAn invite is deletedInvite audience
Guild Member AddA user becomes a member of a connected guildGuild connection
Guild Member UpdateA member’s guild state or public user representation changesGuild connection
Guild Member RemoveA user stops being a member of a connected guildGuild connection
Guild Members ChunkA bounded member result answers Request Guild MembersCommand response
Guild Member List UpdateA subscribed member list resyncs the subscriber’s rangesMember list subscription
Guild Audit Log Entry CreateAn audit log entry is written in a guildHolders of VIEW_AUDIT_LOG
Guild Ban AddA guild ban is createdGuild connection
Guild Ban RemoveA guild ban is removedGuild connection
Presence UpdateOne visible presence changesPresence subscription
Presence Update BulkA recovering guild delivers its visible presences togetherGuild connection
Passive UpdatesChannel last_message_id values or voice states changed for one passive sessionPassive session
Message CreateA visible message is createdChannel visibility
Message UpdateA visible message changes and is republished in fullMessage access
Message DeleteOne visible message is deletedMessage access
Message Delete BulkSeveral messages in one channel are deleted togetherChannel visibility
Message ACKThe current user’s read state advances for a channelCurrent user
Message Reaction AddA user adds a reaction to a messageMessage access
Message Reaction Add ManyA debouncing session receives several reaction additions as one eventMessage access
Message Reaction RemoveOne user’s reaction is removed from a messageMessage access
Message Reaction Remove AllEvery reaction is removed from a message at onceMessage access
Message Reaction Remove EmojiEvery reaction using one emoji is removed from a messageMessage access
Typing StartA visible user begins typing in a channelChannel visibility
Channel Pins UpdateA channel’s most recent pin time changesChannel visibility
Channel Pins ACKThe current user acknowledges a channel’s pinsCurrent user
Voice State UpdateA guild or call participant’s voice state changesChannel visibility
Voice Server UpdateThe session receives or replaces its own voice grantCurrent session
Entrance Sound PlayA participant’s entrance sound plays in a voice channelVoice channel
Call CreateA private channel call begins or becomes visibleCall recipient
Call UpdateThe ringing set, participant roster, or region of a call changesCall recipient
Call DeleteA call ends or becomes unavailableCall recipient
Guild Counts UpdateMember and online counts are returned for connected guildsCommand response
Channel Member Counts UpdatePer-channel member and online counts are returned for one guildCommand response

The initial session state. Sent once after a successful Identify, always with sequence 1.

FieldTypeDescription
session_idstringIdentifier for Resume
versionintegerGateway API version the connection negotiated, always 1
useruser objectThe authenticated account in its private representation
guilds1array[guild ready object]The session’s guilds
private_channelsarray[channel object]Direct message and group direct message channels
relationships2array[relationship object]The account’s relationships
presences3array[presence object]Visible presences at connection time
users4array[partial user object]Users referenced by the payload
sessionsarray[session presence object]The account’s other live sessions
read_statesarray[read state object]Per-channel read state
user_settings?user settings objectAccount-wide settings
user_guild_settingsarray[user guild settings object]Per-guild notification settings
notesmap[snowflake, string]Private notes keyed by user ID
pinned_dmsarray[snowflake]Pinned private channel IDs
favorite_memesarray[meme object]Saved memes
webauthn_credentialsarray[WebAuthn credential object]Registered WebAuthn credentials
rtc_regionsarray[RTC region object]Voice regions, ordered nearest first
country_codestringCountry resolved from the connecting address, US when the address resolves to none
latitude?stringLatitude resolved from the connecting address, rendered as a decimal string
longitude?stringLongitude resolved from the connecting address, rendered as a decimal string
auth_session_id_hash?stringBase64url hash identifying the authentication session
shard?array[integer]The accepted [shard_id, shard_count] pair, present only when Identify supplied one
_timings?objectHTTP-side timing breakdown, present only for a staff account
_timings_gw?objectGateway-side timing breakdown, present only for a staff account

1 On a bot session every entry is an unavailable guild with id and unavailable: true alone. The burst described below then sends a Guild Create with the full state of each available guild, and a Guild Delete for each unavailable one

2 Each entry has its user field removed and the removed accounts appear in users instead, so a client resolves a relationship through the entry’s id

3 A bot session always receives an empty array here

4 Collected from the account’s relationships, the recipients of its private channels, and the members in guilds, deduplicated by account ID. A bot session always receives an empty array here

Ready is sent outside the replay buffer, so a Resume never replays it.

A bot session receives one Guild Create per available guild immediately after Ready, and one Guild Delete per unavailable guild. Together they resolve the entries of the guilds array. Those Dispatches are also sent outside the replay buffer.

Shortly after Ready, every session receives one Call Create for each of its private channels that has an active call.

The same structure appears in Ready, Guild Create, and Guild Sync.

FieldTypeDescription
idsnowflakeGuild ID
propertiesguild objectGuild record without its roles, channels, emojis, stickers, or members
rolesarray[guild role object]Every role in the guild
channelsarray[channel object]Channels the session can view
emojisarray[guild emoji object]Every emoji in the guild
stickersarray[guild sticker object]Every sticker in the guild
members1array[guild member object]The members the session needs immediately
member_countintegerTotal member count
online_count2integerOnline member count
presences3array[presence object]Always an empty array
voice_statesarray[voice state object]Voice states in channels the session can view
joined_at?ISO8601 timestampWhen the account joined the guild, null when the account is not a member
unavailable?booleanWhether the guild is unavailable
unavailable_hidden?booleanWhether an unavailable guild is hidden from the client

1 The session’s own member object plus the member object of every participant named by voice_states, and nothing else. A client that needs the rest of the roster asks for it with Request Guild Members or subscribes to a member list through Lazy Request

2 Counts the members that hold a live Gateway session and publish a status other than offline or invisible. Every recipient receives the same guild-wide figure. Guild Counts Update reports a per-viewer count

3 Guild presences arrive as separate Presence Update and Presence Update Bulk Dispatches

An unavailable guild is reduced to id and unavailable: true, plus unavailable_hidden: true when the guild is hidden. It has none of the other fields. Every entry in a bot session’s Ready guilds array has this form, with id and unavailable: true alone.

Inside Ready, and inside the Guild Create burst a bot receives immediately after Ready, each entry in members has its user replaced by {"id": "..."}. A bot session’s Ready has no members at all, because each of its guilds is an unavailable guild, so a bot sees the reduced form in the burst alone. On a user session the removed accounts appear in the Ready payload’s users array. A bot’s users array is empty, so a bot pulls those accounts with Request Guild Members. A Guild Create sent later in the session, and every Guild Sync, have the members with user intact.

FieldTypeDescription
session_idstringSession identifier, or the literal all for the aggregate entry
statusstringonline, idle, dnd, invisible, or offline
afkbooleanWhether the session is away
mobilebooleanWhether the session is mobile

The first entry always has session_id: "all" and the account’s combined status, which is the first of dnd, online, idle, and invisible that any of its sessions has, or offline when none has one.

FieldTypeDescription
idstringCredential ID
namestringCredential name
created_atISO8601 timestampWhen the credential was registered
last_used_at?ISO8601 timestampWhen the credential was last used
rp_idstringThe domain the passkey was created for, as in the WebAuthn credential object

Replaced passkeys never appear in this list.

FieldTypeDescription
idstringRegion ID
namestringHuman-readable region name
emojistringRegion emoji

The array always begins with a synthetic entry whose id is automatic, name is Automatic, and emoji is the globe. Choosing that entry leaves the region to the server. Every other entry is a region the account can select, ordered by distance from the latitude and longitude in the Identify properties. FiveCord orders by distance only when both values parse as finite numbers, and otherwise orders by region ID.

Sent after a successful Resume has replayed every retained Dispatch above the supplied sequence.

FieldTypeDescription
_timings_gw?objectGateway-side timing breakdown, present only for a staff account

The payload is otherwise empty. Resumed has the session’s current sequence in s without advancing it, and the next live Dispatch has that sequence plus one.

The account’s set of live sessions changed. The payload is a bare JSON array of session presence objects and is always the complete set. A client that stores the sessions replaces them with this array. Ready sends the initial set as sessions.

The account’s authentication session was rotated, for example by a password change on another device.

FieldTypeDescription
old_auth_session_id_hashstringBase64url hash of the authentication session that was replaced
new_auth_session_id_hashstringBase64url hash of the replacement authentication session
new_tokenstringReplacement for the token the client holds

Every session of the account receives the event, including the one that caused the rotation. A client MUST use new_token for every later HTTP request and for any later Resume or Identify. A client whose own auth_session_id_hash from Ready equals old_auth_session_id_hash MUST replace it with new_auth_session_id_hash.

A Request Guild Members command was refused by the bot full-member-list budget. Delivered to the requesting session alone.

FieldTypeDescription
opcodeintegerThe refused opcode, which is always 8
retry_afternumberSeconds until the request can be retried
metaobjectContext for the refused request

meta has guild_id and, when the request named exactly one guild and supplied a valid nonce, nonce.

That budget admits one unfiltered member request per bot account and guild every 30,000 ms, and retry_after is the remainder of that window in seconds. Every other command refusal is silent.

The current user’s account record changed. The payload is the complete user object in its private representation.

Presence subscribers receive the updated user in a Presence Update, unless the user’s published status is offline.

The current user’s account-wide settings changed. The payload is the complete user settings object.

FiveCord republishes the account’s presence on every settings update, whether or not status or custom_status changed. A status of offline in the payload is treated as invisible, and it forces every live session of the account to that status.

One guild’s notification settings changed. The payload is that guild’s complete user guild settings object.

The current user wrote or cleared a private note.

FieldTypeDescription
idsnowflakeUser the note is about
notestringNote text, empty when cleared

The current user’s pinned private channel set changed. The payload is a bare JSON array of channel ID strings in pinned order and is always the complete set. A client that stores the pinned channels replaces them with this array. Ready sends the initial set as pinned_dms.

The current user’s external connection set changed.

FieldTypeDescription
connectionsarray[connection object]Every connection the account holds

connections is always the complete set. A client that stores the connections replaces them with this array.

The current user’s WebAuthn credential set changed. The payload is a bare JSON array of WebAuthn credential objects and is always the complete set. A client that stores the credentials replaces them with this array. Ready sends the initial set as webauthn_credentials.

The current user gained a relationship. The payload is the complete relationship object.

FieldTypeDescription
idsnowflakeThe other user’s ID
typeintegerRelationship type
userpartial user objectThe other user
since?ISO8601 timestampWhen the relationship was created, absent when the record has no timestamp
nickname?stringPrivate nickname for the other user
share_voice_activitybooleanWhether the current user shares voice activity with this friend on the Active Now panel
friend_shares_voice_activity1booleanWhether the other user shares voice activity with the current user

1 Always true on this Dispatch, even for a friendship whose counterpart has sharing off

A client that needs the real value MUST read it from List relationships.

An existing relationship changed. The payload has the same structure as Relationship Add.

friend_shares_voice_activity is the counterpart’s real setting only on the pair of Dispatches that Modify voice activity sharing sends to both parties of each friendship. Every other Relationship Update sends true.

A relationship ended.

FieldTypeDescription
idsnowflakeThe other user’s ID

The current user saved a message. The payload is the complete message object as that user sees it.

The current user unsaved a message.

FieldTypeDescription
message_idsnowflakeThe message that is no longer saved

The current user removed a message from the recent mention feed.

FieldTypeDescription
message_idsnowflakeThe message removed from the feed

The current user saved a meme. The payload is the complete meme object.

One of the current user’s memes changed. The payload is the complete meme object.

The current user deleted a meme.

FieldTypeDescription
meme_idsnowflakeThe deleted meme

A guild became available to the session. The payload is a guild ready object.

roles, channels, emojis, stickers, and voice_states are always complete. A client that stores any of them for the guild replaces its stored list with the new array. members is a partial list. A client adds or updates those members and keeps every other member it already stores.

Every session receives Guild Create when a guild becomes available after Ready, for example after joining one or after an unavailable guild recovers. A bot session also receives one for each available guild in the burst that follows Ready.

A bot session’s Guild Create has unavailable: false unless it is the first Guild Create for a guild the bot joined during the session and Ready did not list. That Dispatch has no unavailable field, even when a Guild Delete with unavailable: true for the guild came before it. A user session never receives the field on Guild Create.

A session that asked for a sync through Lazy Request receives the guild’s full current state again. The payload is a guild ready object, and a client handles it the same way as Guild Create.

FiveCord sends a sync when a Lazy Request switches the guild between active and passive, and when sync: true names a guild the session has not already synced. A second sync: true for an already-synced guild sends nothing.

A guild’s configuration changed. The payload is the complete guild object with guild_id added, which repeats the object’s own id.

Guild Update is the only Dispatch an unavailable guild sends. A client learns from it that a guild entered or left the unavailable state.

A guild left the session’s visibility, or became unavailable.

FieldTypeDescription
idsnowflakeGuild ID
guild_id?1snowflakeRepeats id
unavailable?booleanTrue when the guild is temporarily unavailable
unavailable_hidden?booleanTrue when an unavailable guild is hidden from the client

1 Present only when the guild itself is deleted. The payload has id alone when the account leaves a guild or is removed from one, and id with unavailable in the unavailable form

Without unavailable, the account is no longer a member, and a client deletes everything it stores for that guild. With unavailable: true, the guild is temporarily unreachable. A client keeps the guild as an unavailable entry until a later Guild Create sends its full state again.

A role was created in a guild.

FieldTypeDescription
guild_idsnowflakeGuild the role belongs to
roleguild role objectThe created role

Exactly one role record changed.

FieldTypeDescription
guild_idsnowflakeGuild the role belongs to
roleguild role objectThe role’s complete updated representation

One operation changed several roles together, most often a reorder.

FieldTypeDescription
guild_idsnowflakeGuild the roles belong to
rolesarray[guild role object]Every changed role in its complete updated representation

A role was deleted from a guild.

FieldTypeDescription
guild_idsnowflakeGuild the role belonged to
role_idsnowflakeThe deleted role

A guild’s emojis changed.

FieldTypeDescription
guild_idsnowflakeGuild the emojis belong to
emojisarray[guild emoji object]Every emoji in the guild

A client that stores the guild’s emojis replaces them with this array. FiveCord does not send per-emoji create, update, or delete events.

A guild’s stickers changed.

FieldTypeDescription
guild_idsnowflakeGuild the stickers belong to
stickersarray[guild sticker object]Every sticker in the guild

A client that stores the guild’s stickers replaces them with this array. FiveCord does not send per-sticker create, update, or delete events.

A channel became visible to the session, whether newly created or newly permitted. The payload is the complete channel object, with guild_id present for a guild channel.

A visible channel changed. The payload is the complete channel object.

One operation changed several channels together, most often a reorder.

FieldTypeDescription
guild_idsnowflakeGuild the channels belong to
channelsarray[channel object]Every changed channel in its complete updated representation

Each recipient sees only channels they can view. An empty result produces no Dispatch and consumes no sequence number.

A channel left the session’s visibility, whether deleted or newly hidden. The payload is the complete channel object as it was before the change.

Recipients are the sessions that could see the channel before it was deleted.

A user joined a group direct message the session belongs to.

FieldTypeDescription
channel_idsnowflakeGroup direct message channel
userpartial user objectThe user that joined

A user left a group direct message the session belongs to.

FieldTypeDescription
channel_idsnowflakeGroup direct message channel
userpartial user objectThe user that left

The webhook set of a guild channel changed. The event has no webhook data, so a client that needs the new set reads it over the HTTP API.

FieldTypeDescription
guild_idsnowflakeGuild the channel belongs to
channel_idsnowflakeChannel whose webhooks changed

An invite was created. The payload is the complete invite object extended with its invite metadata.

A guild invite reaches the sessions holding MANAGE_CHANNELS on the invite’s channel. A group direct message invite reaches every recipient of that group, with no permission check.

An invite was deleted.

FieldTypeDescription
codestringThe deleted invite code
channel_id?snowflakeChannel the invite pointed at, absent when the invite stored none
guild_id?1snowflakeGuild the invite belonged to

1 Present on every guild invite. A group direct message invite has no guild_id

Recipients are chosen the same way as for Invite Create.

A user became a member of a guild the session is connected to. The payload is the complete guild member object with guild_id added.

A member’s guild state or public user representation changed. The payload is the complete guild member object with guild_id added.

In a guild with more than 250 members, a passive session receives this event only when the subject is its own user.

A user stopped being a member of a guild the session is connected to.

FieldTypeDescription
guild_idsnowflakeGuild the user left
user1objectThe user that is no longer a member

1 The object has id alone. No other account field is sent, so a client MUST resolve the account from state it already holds

In a guild with more than 250 members, a passive session receives this event only when the subject is its own user.

Answers Request Guild Members for the requesting session.

FieldTypeDescription
guild_idsnowflakeGuild the members belong to
membersarray[guild member object]Up to 1,000 members
chunk_indexintegerZero-based index of this chunk
chunk_countintegerTotal chunks in this response
presences?array[presence object]Present only when the request set presences and at least one member has a visible presence
nonce?stringEchoed only when the request named exactly one guild and supplied a valid nonce

A request that matches no member still produces one chunk with an empty members array, chunk_index 0, and chunk_count 1.

This event is delivered live and is never retained for Resume replay.

A member list the session subscribed to through Lazy Request resyncs the subscriber’s ranges.

FieldTypeDescription
guild_idsnowflakeGuild the list belongs to
idstringList identifier, which is always the channel ID as a string
channel_id?snowflakeChannel the list is scoped to
member_countintegerTotal members in the list
online_countintegerOnline members in the list
groupsarray[member list group object]Group headers in list order
opsarray[member list operation object]Operations to apply
FieldTypeDescription
id1stringGroup identifier, which is a hoisted role ID, online, or offline
countintegerMembers in the group

1 Hoisted role groups come first in role order, then online, then offline

A group whose count is 0 is omitted. The offline group is also omitted once it holds more than 1,000 members, and in that case items omits the offline members too. member_count can then exceed the number of items a client can ever read back.

FieldTypeDescription
opstringOperation kind, which is always SYNC
rangearray[integer]Inclusive [start, end] range this operation replaces
itemsarray[member list item object]Replacement items for the range

SYNC is the only operation FiveCord sends. A client MUST ignore an operation whose op it does not recognise or whose range fails the bounds in Lazy Request.

Each item has exactly one of the fields.

FieldTypeDescription
group?member list group objectA group header occupying one list position
member?1guild member objectA member of the list

1 Extended with a presence field that always exists. The value is the guild’s presence object for that member when the member is visibly online to the guild, and otherwise the placeholder {"status": "offline", "mobile": false, "afk": false}

An audit log entry was written. The payload is the guild audit log entry object that List guild audit logs returns for the same entry, with guild_id added. It always has id, action_type, user_id, and target_id. reason is resolved as the audit log reason describes, and options has only the published audit log options keys, with the same number and boolean types. changes is present when at least one change survives scrubbing.

An update that changes nothing records no entry, as the audit actions registry states, so it emits no event.

The ip change key is stripped from changes, so an entry whose only change was ip has no changes at all. A client MUST treat an absent options or changes as an empty set.

Recipients are every session in the guild that holds VIEW_AUDIT_LOG, including the acting session.

A guild ban was created.

FieldTypeDescription
guild_idsnowflakeGuild the ban was created in
user1objectThe banned user

1 The object has id alone. No other account field is sent

A guild ban was removed.

FieldTypeDescription
guild_idsnowflakeGuild the ban was removed from
user1objectThe unbanned user

1 The object has id alone. No other account field is sent

One visible presence changed. The payload is a presence object.

A session receives a presence for a friend, for a recipient of a group direct message it belongs to, and for a guild member it subscribed to through the members array of a Lazy Request. A bot session holds no friend or group direct message subscription, so the guild path is the only one that reaches it.

Presence Updates normally follow Ready. The initial Presence Update burst omits users already included in Ready. If Ready takes more than 10,000 ms, Presence Updates can arrive before it.

Later presences can be delayed until their guild, relationship, or group direct message becomes visible. They may arrive after Relationship Add, Relationship Update, Channel Create, Channel Update, or Channel Recipient Add. Delivery is not guaranteed for a subject that never becomes visible.

FieldTypeDescription
userpartial user objectThe user the presence belongs to
statusstringonline, idle, dnd, or offline
mobilebooleanWhether the user’s active status comes from a mobile session
afkbooleanWhether every one of the user’s sessions is away
custom_status?custom status objectThe user’s custom status
guild_id?snowflakeGuild context, present when the presence arrived through a guild

An account’s published status is the highest-precedence status across its live sessions, resolved in the order dnd, online, idle, invisible, and finally offline when no session is live. A session that selected invisible, and an account with no live session, both publish status: "offline". A session that lost its transport is published as offline 5,000 ms later, even though it stays resumable for the rest of its 60,000 ms retention window. A successful Resume republishes the status it last selected.

mobile is true only when the account’s resolved status is online and at least one online session declared itself mobile. afk is false whenever mobile is true. Otherwise it is true only when every live session is away.

custom_status is suppressed to null whenever the published status is offline, so an invisible account never reveals one.

FieldTypeDescription
text?stringCustom status text
expires_at?ISO8601 timestampWhen the custom status expires
emoji_id?snowflakeCustom emoji ID
emoji_name?stringUnicode emoji, or the custom emoji’s name
emoji_animatedbooleanWhether the custom emoji is animated

Several visible presences are delivered in one Dispatch. A guild sends this only when it leaves the unavailable state. Every session that stayed connected receives it immediately after the Guild Create that restores the guild.

FieldTypeDescription
guild_idsnowflakeGuild context applied to every entry
presences1array[presence object]The presences, at most 500 per Dispatch

1 Only visibly online presences are included, and the recipient’s own presence is removed. A batch that would be empty produces no Dispatch, and a set larger than 500 is split across consecutive Dispatches

Every entry has the batch’s guild context. A client MUST treat each entry as if it named guild_id itself.

A passive session in a guild with more than 250 members receives missed changes every 30,000 ms. No event is sent when nothing changed.

FieldTypeDescription
guild_idsnowflakeGuild the update covers
channelsmap[snowflake, snowflake]Changed last_message_id per channel
voice_states?1array[voice state object]Changed voice states in channels the session can view

1 Omitted when the set would be empty. A participant that left a viewable channel since the previous cycle appears here with channel_id set to null

channels contains only the channels whose last_message_id changed since the previous update for that session, and only channels that session can view. voice_states contains only the voice states whose version advanced.

A visible message was created. The payload is the complete message object with the fields below added.

FieldTypeDescription
channel_typeintegerChannel type of the channel the message was created in
nicks?map[snowflake, string]Group direct message nicknames, present only for a group direct message that stores at least one
mention_here?booleanAlways true when present, and present only when the message has a here mention
guild_id?snowflakeGuild the channel belongs to
member?1guild member objectThe author’s guild member object, present in a guild channel

1 The user field is removed from it, and the account is in the message’s author

Message Create alone overrides both the passive filter and the ignored_events list, and the two use different tests. A direct mention, a mention of one of the user’s roles, an everyone mention, or a here mention overrides the passive filter. A direct, everyone, or here mention alone overrides the ignored_events list.

A visible message changed. The payload is the complete current message object, with no channel_type, nicks, or mention_here. In a guild channel it is extended with guild_id and with member, the author’s guild member object with its user field removed.

Recipients must hold READ_MESSAGE_HISTORY on the channel, or the message must be newer than the guild’s message history cutoff.

One visible message was deleted.

FieldTypeDescription
idsnowflakeThe deleted message
channel_idsnowflakeChannel the message was in
content?1?stringContent the message held before it was deleted
author_id?1snowflakeAccount that wrote the message
guild_id?snowflakeGuild the channel belongs to
member?2guild member objectThe author’s guild member object, present in a guild channel

1 Both fields are omitted when an instance administrator deleted the message through the Admin API, when FiveCord deleted it after a CSAM report, or when FiveCord deleted it because content moderation blocked a link preview in it, and author_id is also omitted for a message with no author

2 The user field is removed from it, and the whole field is absent when author_id is absent or the author is no longer a member

Several messages in one channel were deleted together.

FieldTypeDescription
idsarray[snowflake]The deleted messages
channel_idsnowflakeChannel the messages were in
guild_id?snowflakeGuild the channel belongs to

The current user’s read state advanced for a channel, usually because another of the account’s sessions read it.

FieldTypeDescription
channel_idsnowflakeChannel whose read state advanced
message_idsnowflakeMessage the read state now points at
mention_countintegerRemaining mention count for the channel
manual?booleanWhether the acknowledgement was explicit
version?stringRead state version as a decimal string

A user added a reaction to a message.

FieldTypeDescription
user_idsnowflakeUser that reacted
channel_idsnowflakeChannel the message is in
message_idsnowflakeMessage that was reacted to
emojireaction emoji objectThe emoji
guild_id?snowflakeGuild the channel belongs to
member?guild member objectThe reacting user’s guild member object, present in a guild channel

In a guild channel the session named by the request’s session_id is excluded and that field is removed from the payload. In a private channel the field is delivered as session_id and excludes nobody, so a client MUST tolerate receiving its own reaction back.

FieldTypeDescription
namestringUnicode emoji, or the custom emoji’s name
id?snowflakeCustom emoji ID, absent for a Unicode emoji
animated?1booleanWhether the custom emoji is animated

1 Present only on the Message Reaction Add that creates the first reaction with that emoji on the message. An addition to an emoji that already has a reactor, a Message Reaction Remove, and a Message Reaction Remove Emoji omit the field

Neither id nor animated is ever null. A Unicode reaction omits both, so a client distinguishes the forms by the presence of id. A client MUST NOT read an absent animated as false.

With the DEBOUNCE_MESSAGE_REACTIONS session flag, private-channel additions are grouped over 650 ms and delivered together. Each window keeps the latest 512 additions. Guild-channel additions always arrive as individual Message Reaction Add events.

FieldTypeDescription
channel_id1snowflakeChannel the message is in
message_id1snowflakeMessage that was reacted to
guild_id?1snowflakeGuild the channel belongs to
reactionsarray[reaction addition object]The merged additions, in arrival order

1 Every addition in reactions belongs to this message. A window covering several messages produces a separate Dispatch for each

When the window closes holding exactly one addition, FiveCord sends Message Reaction Add to the session. A session without the flag receives one Message Reaction Add per addition.

FieldTypeDescription
user_idsnowflakeUser that reacted
emojireaction emoji objectThe emoji
member?guild member objectThe reacting user’s guild member object, present in a guild channel

One user’s reaction was removed from a message.

FieldTypeDescription
user_idsnowflakeUser whose reaction was removed
channel_idsnowflakeChannel the message is in
message_idsnowflakeMessage the reaction was on
emojireaction emoji objectThe emoji
guild_id?snowflakeGuild the channel belongs to
member?guild member objectThe user’s guild member object, present in a guild channel

Exclusion works exactly as it does for Message Reaction Add, so the acting session is dropped in a guild channel and kept in a private one.

With reaction debouncing enabled, an addition removed within the same window produces neither event for that message, user, and emoji.

Every reaction was removed from a message at once.

FieldTypeDescription
channel_idsnowflakeChannel the message is in
message_idsnowflakeMessage whose reactions were cleared
guild_id?snowflakeGuild the channel belongs to

Every reaction using one emoji was removed from a message.

FieldTypeDescription
channel_idsnowflakeChannel the message is in
message_idsnowflakeMessage the reactions were on
emojireaction emoji objectThe emoji whose reactions were removed
guild_id?snowflakeGuild the channel belongs to

A visible user began typing in a channel.

FieldTypeDescription
channel_idsnowflakeChannel the user is typing in
user_idsnowflakeUser that started typing
timestampintegerUnix seconds when typing started
guild_id?snowflakeGuild the channel belongs to
member?guild member objectThe typing user’s guild member object, present in a guild channel

The typing override set through Lazy Request decides delivery in a guild. With no override, a session receives the event when it is active in the guild or when the guild has 250 members or fewer, so a passive session in a small guild still receives it. A guild that sets the TYPING_EVENTS bit in its disabled operations produces the event for nobody.

A channel’s most recent pin time changed.

FieldTypeDescription
channel_idsnowflakeChannel whose pins changed
last_pin_timestamp?ISO8601 timestampTime of the most recent pin, null when nothing is pinned
guild_id?snowflakeGuild the channel belongs to

The current user acknowledged a channel’s pins. Every session of the account receives it, including the one that issued the acknowledgement.

FieldTypeDescription
channel_idsnowflakeChannel whose pins were acknowledged
timestampISO8601 timestampTime the acknowledgement recorded for the channel

A participant’s voice state changed. The payload is a voice state object.

Recipients are the sessions that can view the voice channel, passive sessions included. A passive session in a guild with more than 250 members also receives the changed voice states through Passive Updates.

A channel_id of null means the participant left.

FieldTypeDescription
guild_id?snowflakeGuild the voice channel belongs to, null in a call
channel_id?snowflakeVoice channel, null when the participant left
user_id?snowflakeParticipant
connection_id?stringVoice connection identity
session_id?stringGateway session that owns the connection
member?guild member objectThe participant’s guild member object, null in a call
mutebooleanServer mute
deafbooleanServer deafen
self_mutebooleanLocal microphone mute
self_deafbooleanLocal output deafen
self_videobooleanWhether the participant publishes camera video
self_stream1booleanWhether the connection advertises a screenshare track
is_mobilebooleanWhether the participant is on a mobile client
suppressbooleanWhether the participant is suppressed
viewer_stream_keysarray[string]Streams this connection is watching
e2ee_capablebooleanWhether the participant’s client supports end-to-end encrypted voice
versionintegerMonotonic version of this participant’s voice state

1 The participant’s client reports this value. In a guild voice channel FiveCord sets it to false when the participant lacks STREAM

The broadcast form has no region_id, server_id, latitude, or longitude.

The session received or replaced its own voice grant. Delivered to the requesting session alone.

FieldTypeDescription
tokenstringThe LiveKit access token this connection presents
endpointstringThe LiveKit signalling URL to connect to, a ws:// or wss:// address
connection_idstringThe voice connection the grant covers
channel_idsnowflakeThe channel the grant covers
guild_id?1snowflakeThe guild the channel belongs to
e2ee_key?2stringThe key material the channel’s end-to-end encryption uses

1 Present for a guild voice channel and absent for a call, so a client reads the scope from this field

2 Present only when the channel is end-to-end encrypted

FiveCord uses LiveKit for voice media. There is no second voice websocket, no voice opcode set, and no UDP discovery step. A client opens a LiveKit connection to endpoint, presents token there, and speaks the LiveKit protocol from that point on. Voice states the room naming, the participant identity, and the track sources a grant admits.

A grant is issued when a connection opens, when it moves to another channel, and when its region changes. Toggling self_mute, self_video, or self_stream produces no new grant. A call region change reissues one grant to each participant of the call.

A participant asked for their entrance sound to play in a voice channel they are already connected to.

FieldTypeDescription
user_idsnowflakeParticipant whose sound plays
channel_idsnowflakeVoice channel
guild_id?snowflakeGuild the channel belongs to, null for a call
sound_idsnowflakeEntrance sound
hashstringContent hash of the sound file
urlstringURL to fetch the sound from
duration_msintegerSound duration in milliseconds
content_typestringMIME type of the sound file

Recipients are every other account with a voice state in that channel, one Dispatch each and at most one per account. The requesting account never receives its own sound.

A private channel call began, or became visible in the session’s initial state.

FieldTypeDescription
channel_idsnowflakeChannel the call is in
message_idsnowflakeCall message that opened the call
region?stringVoice region serving the call, null until one is chosen
ringingarray[snowflake]Recipients being rung
voice_states1array[voice state object]Participants, ordered by participant ID
recipients?2array[snowflake]Every recipient of the channel
created_at?2integerUnix milliseconds when the call was opened

1 Entries also include region_id and server_id, which clients MUST ignore

2 Present on initial or recovered call state

Initial call state arrives shortly after Ready. Recovered state can arrive after a lost call connection, whether or not the client received Call Delete.

Recipients are every recipient of the channel, whether or not they joined the call. The same set receives Call Update and Call Delete.

The ringing set, participant roster, or region of an active call changed. The payload has the same structure as Call Create without recipients and created_at.

An operation with no visible effect produces no Call Update.

A call ended, or became unavailable.

FieldTypeDescription
channel_idsnowflakeChannel the call was in
unavailable?1booleanTrue when the call became unavailable

1 Absent when the call ended

With unavailable: true, the client MUST keep the call as an unavailable entry. If it becomes available again, a fresh Call Create includes recipients and created_at. Recovery is not guaranteed.

Answers Request Guild Counts for the requesting session.

FieldTypeDescription
countsarray[guild count entry object]One entry per guild that answered in time
nonce?stringEchoed when the request supplied a valid nonce

A guild that is not connected, or that missed its deadline, has no entry in counts.

FieldTypeDescription
guild_idsnowflakeGuild the counts describe
member_countintegerTotal members
online_count1integerOnline members visible to the requesting account

1 Counts only the online members that share at least one channel the requesting account can view. An account holding ADMINISTRATOR receives the guild’s whole online count instead, and an account that can view no channel receives 1 when it is itself online and 0 when it is not

Answers Request Channel Member Counts for the requesting session.

FieldTypeDescription
countsarray[channel count entry object]One entry per channel that answered
nonce?stringEchoed when the request supplied a valid nonce

A channel the session cannot view, and a channel on which it lacks VIEW_CHANNEL_MEMBERS, has no entry in counts.

FieldTypeDescription
guild_idsnowflakeGuild the channel belongs to
channel_idsnowflakeChannel the counts describe
member_countintegerMembers that can view the channel
online_countintegerOnline members that can view the channel

Every resource object named on this page has the representation defined by the HTTP API. A Dispatch payload with a resource object has the same fields, with the guild-scoped events adding guild_id and the message and reaction events adding member.

These reductions are specific to the Gateway and appear nowhere in the HTTP API. Ready strips user from each relationship and from each guild member and moves those accounts into its users array. The member added to a message event has its own user removed, and the account is in the message’s author. A client MUST resolve those accounts from the surrounding payload.