Skip to content

Gateway Events

A dispatch event arrives with opcode 0, with t (event name) and d (payload). Every event also increments s — the sequence number in the session.

{ "op": 0, "s": 42, "t": "MESSAGE_CREATE", "d": { ... } }

To mute categories you don’t need, pass their names in ignored_events inside IDENTIFY.

Events group by prefix:

PrefixCategory
READY, RESUMED, SESSIONS_REPLACESession lifecycle
GUILD_*Guilds, roles, members, bans, emojis, stickers
CHANNEL_*Channels and permission overwrites
MESSAGE_*Messages, reactions, pins
PRESENCE_*, TYPING_*, USER_*User activity and profiles
VOICE_*, CALL_*Voice and calls
INVITE_*, WEBHOOKS_*Integrations
RELATIONSHIP_*Friendships and blocks

Detailed descriptions below for events that bots usually care about.

Sent after a successful IDENTIFY. Carries info about the current user and a first snapshot of guilds.

{
"v": 1,
"user": {
"id": "1496956937664585746",
"username": "my_bot",
"global_name": null,
"bot": true,
"flags": 0
},
"session_id": "a1b2c3d4e5f6",
"resume_gateway_url": "wss://gateway.floodilka.com",
"guilds": [
{ "id": "142...", "unavailable": true }
],
"user_settings": {}
}

Guilds are marked unavailable: true — full data arrives next as GUILD_CREATE events.

Sent after a successful RESUME. Empty d. The client has already been caught up with replayed events — they arrive before RESUMED.

A new message in a channel where the client has READ_MESSAGE_HISTORY.

{
"id": "1465760123456789",
"channel_id": "1465759683653402624",
"guild_id": "1424883034267582464",
"author": {
"id": "974...",
"username": "puncher",
"global_name": "Max",
"avatar": "abcd1234",
"bot": false
},
"member": {
"roles": ["1424..."],
"joined_at": "2026-04-01T12:00:00.000Z",
"nick": null
},
"content": "hi everyone",
"timestamp": "2026-04-23T19:40:59.000Z",
"edited_timestamp": null,
"attachments": [],
"embeds": [],
"mentions": [],
"mention_roles": [],
"mention_everyone": false,
"pinned": false,
"type": 0
}

The member field only appears for guild messages (not DMs).

A message was edited. Payload is the Message object with updated fields. edited_timestamp is no longer null.

{ "id": "1465...", "channel_id": "1465...", "guild_id": "1424..." }

Bulk deletion (usually moderation):

{
"ids": ["1465...", "1465..."],
"channel_id": "1465...",
"guild_id": "1424..."
}
{
"user_id": "974...",
"channel_id": "1465...",
"guild_id": "1424...",
"message_id": "1465...",
"member": { ... },
"emoji": { "id": null, "name": "👍" }
}

emoji.id === null — a Unicode emoji, name is the character. emoji.id !== null — a custom emoji, name is its shortcode, id is its snowflake.

MESSAGE_REACTION_REMOVE / REMOVE_EMOJI / REMOVE_ALL

Section titled “MESSAGE_REACTION_REMOVE / REMOVE_EMOJI / REMOVE_ALL”

Same shape, but describes removal. REMOVE_ALL means all reactions on the message were cleared.

Full guild data — sent after READY (for every guild in READY.guilds) and also when the bot is added to a new guild.

{
"id": "1424883034267582464",
"name": "Test server",
"icon": null,
"owner_id": "974...",
"roles": [ ... ],
"emojis": [ ... ],
"channels": [ ... ],
"members": [ ... ],
"voice_states": [ ... ],
"presences": [ ... ],
"member_count": 3,
"features": [],
"system_channel_id": "..."
}

GUILD_UPDATE — partial guild change. GUILD_DELETE — the bot was removed, or the guild became unavailable: {"id": "...", "unavailable": true}.

A new member joined. Payload is a Member object plus guild_id:

{
"guild_id": "1424...",
"user": { "id": "...", "username": "...", ... },
"roles": [],
"joined_at": "2026-04-23T20:00:00.000Z",
"nick": null
}
{
"guild_id": "1424...",
"user": { "id": "...", "username": "...", ... }
}

Role or nickname changes on a member.

CHANNEL_CREATE / CHANNEL_UPDATE / CHANNEL_DELETE

Section titled “CHANNEL_CREATE / CHANNEL_UPDATE / CHANNEL_DELETE”

Structural changes to guild channels. Payload is a Channel object.

A member’s status and activities changed:

{
"user": { "id": "..." },
"guild_id": "1424...",
"status": "online",
"activities": [
{ "name": "Minecraft", "type": 0, "created_at": 1714000000 }
],
"client_status": { "desktop": "online" }
}

status values: online, idle, dnd, offline, invisible.

A user started typing. The event isn’t repeated within ~10 seconds — your client-side decay timer handles the fade.

{
"channel_id": "1465...",
"guild_id": "1424...",
"user_id": "974...",
"member": { ... },
"timestamp": 1714000000
}

Someone joined, left, or changed state in a voice channel:

{
"guild_id": "1424...",
"channel_id": "1465...",
"user_id": "974...",
"member": { ... },
"session_id": "a1b2c3",
"deaf": false,
"mute": false,
"self_deaf": false,
"self_mute": false,
"self_video": false,
"suppress": false
}

channel_id: null means the user left voice.

  • READY — after IDENTIFY
  • RESUMED — after a successful RESUME
  • GUILD_CREATE — full guild data after READY and when the bot is added
  • GUILD_UPDATE — guild settings changed
  • GUILD_DELETE — bot removed or guild unavailable
  • GUILD_BAN_ADD / GUILD_BAN_REMOVE
  • GUILD_EMOJIS_UPDATE / GUILD_STICKERS_UPDATE
  • GUILD_MEMBER_ADD / GUILD_MEMBER_UPDATE / GUILD_MEMBER_REMOVE
  • GUILD_MEMBER_LIST_UPDATE — partial member-list update
  • GUILD_MEMBERS_CHUNK — response to REQUEST_GUILD_MEMBERS
  • GUILD_ROLE_CREATE / GUILD_ROLE_UPDATE / GUILD_ROLE_UPDATE_BULK / GUILD_ROLE_DELETE
  • CHANNEL_CREATE / CHANNEL_UPDATE / CHANNEL_UPDATE_BULK / CHANNEL_DELETE
  • CHANNEL_PINS_UPDATE — pinned-message list changed
  • MESSAGE_CREATE / MESSAGE_UPDATE / MESSAGE_DELETE / MESSAGE_DELETE_BULK
  • MESSAGE_REACTION_ADD / MESSAGE_REACTION_REMOVE
  • MESSAGE_REACTION_REMOVE_ALL / MESSAGE_REACTION_REMOVE_EMOJI
  • PRESENCE_UPDATE — member status / activity change
  • TYPING_START — someone started typing
  • VOICE_STATE_UPDATE — join/leave/mute in a voice channel
  • VOICE_SERVER_UPDATE — LiveKit endpoint + token (for voice bots)
  • INVITE_CREATE / INVITE_DELETE — invite code created/deleted
  • WEBHOOKS_UPDATE — channel webhooks changed
  • USER_UPDATE — your bot’s public fields changed (avatar, name, bio)