An analysis of the messages on the discord WebSocket, for API debugging and reference purpose.

Partitions

CHANNEL_CREATE few samples

{
"d": {
"guild_id": "<string>"
"id": "<string>"
"is_private": false
"last_message_id": null
"name": "<string>"
"permission_overwrites": []
"position": <integer>
"topic": null
"type": "<string>"
}
"op": 0
"s": <integer>
"t": "CHANNEL_CREATE"
}

CHANNEL_CREATE (private) very few samples

{
"d": {
"id": "<string>"
"is_private": true
"last_message_id": null
"recipient": {
"avatar": "<string>"
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
}
"op": 0
"s": <integer>
"t": "CHANNEL_CREATE"
}

CHANNEL_DELETE few samples

{
"d": {
"guild_id": "<string>"
"id": "<string>"
"is_private": false
"last_message_id": "<string>" or null
"name": "<string>"
"permission_overwrites": [
{
"allow": <integer>
"deny": <integer>
"id": "<string>"
"type": "role"
}
...
]
"position": <integer>
"topic": "<string>" or null
"type": "<string>"
}
"op": 0
"s": <integer>
"t": "CHANNEL_DELETE"
}

CHANNEL_DELETE (private) very few samples

{
"d": {
"id": "104262259974369280"
"is_private": true
"last_message_id": "104262313665650688"
"recipient": {
"avatar": "d3413924accb80e7a5a72bc54b1bcec1"
"discriminator": "1980"
"id": "90437808245723136"
"username": "Hornwitser"
}
}
"op": 0
"s": 2164
"t": "CHANNEL_DELETE"
}

CHANNEL_UPDATE

{
"d": {
"guild_id": "<string>"
"id": "<string>"
"is_private": false
"last_message_id": "<string>" or null
"name": "<string>"
"permission_overwrites": [
{
"allow": <integer>
"deny": <integer>
"id": "<string>"
"type": "<string>"
}
...
]
"position": <integer>
"topic": "<string>" or null
"type": "<string>"
}
"op": 0
"s": <integer>
"t": "CHANNEL_UPDATE"
}

GUILD_BAN_ADD

{
"d": {
"guild_id": "<string>"
"user": {
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
}
"op": 0
"s": <integer>
"t": "GUILD_BAN_ADD"
}

GUILD_BAN_REMOVE few samples

{
"d": {
"guild_id": "<string>"
"user": {
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
}
"op": 0
"s": <integer>
"t": "GUILD_BAN_REMOVE"
}

GUILD_CREATE few samples

{
"d": {
"afk_channel_id": "<string>" or null
"afk_timeout": <integer>
"channels": [
{
"id": "<string>"
"last_message_id": "<string>" or null
"name": "<string>"
"permission_overwrites": [
{
"allow": <integer>
"deny": <integer>
"id": "<string>"
"type": "<string>"
}
...
]
"position": <integer>
"topic": "<string>" or null
"type": "<string>"
}
...
]
"icon": "<string>" or null
"id": "<string>"
"joined_at": "<string>"
"large": false optional
"members": [
{
"deaf": false
"joined_at": "<string>"
"mute": false
"roles": [
"<string>"
...
]
"user": {
"avatar": "<string>" or null
"discriminator": "<string>" or <integer>
"id": "<string>"
"username": "<string>"
}
}
...
]
"name": "<string>"
"owner_id": "<string>"
"presences": [
{
"game_id": null or <integer>
"status": "<string>"
"user": {
"id": "<string>"
}
}
...
]
"region": "<string>"
"roles": [
{
"color": <integer>
"hoist": <boolean>
"id": "<string>"
"managed": false optional
"name": "<string>"
"permissions": <integer>
"position": <integer>
}
...
]
"unavailable": false optional
"voice_states": [
{
"channel_id": "104158907961716736"
"deaf": false
"mute": false
"self_deaf": false
"self_mute": false
"session_id": "[REDACTED]"
"suppress": true
"token": "[REDACTED]"
"user_id": "90437808245723136"
}
...
]
}
"op": 0
"s": <integer>
"t": "GUILD_CREATE"
}

GUILD_CREATE (unavailable) very few samples

{
"d": {
"id": "77710284621357056"
"unavailable": true
}
"op": 0
"s": 171220
"t": "GUILD_CREATE"
}

GUILD_DELETE very few samples

{
"d": {
"afk_channel_id": "<string>" or null
"afk_timeout": <integer>
"embed_channel_id": "<string>" or null
"embed_enabled": <boolean>
"icon": "<string>" or null
"id": "<string>"
"joined_at": "<string>" or null
"name": "<string>"
"owner_id": "<string>"
"region": "<string>"
"roles": [
{
"color": <integer>
"hoist": <boolean>
"id": "<string>"
"managed": false optional
"name": "<string>"
"permissions": <integer>
"position": <integer>
}
...
]
}
"op": 0
"s": <integer>
"t": "GUILD_DELETE"
}

GUILD_DELETE (unavailable) very few samples

{
"d": {
"id": "<string>"
"unavailable": true
}
"op": 0
"s": <integer>
"t": "GUILD_DELETE"
}

GUILD_INTEGRATIONS_UPDATE

{
"d": {
"guild_id": "41771983423143937"
}
"op": 0
"s": <integer>
"t": "GUILD_INTEGRATIONS_UPDATE"
}

GUILD_MEMBER_ADD

{
"d": {
"guild_id": "<string>"
"joined_at": "<string>"
"roles": [
"104694319306248192"
...
]
"user": {
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
}
"op": 0
"s": <integer>
"t": "GUILD_MEMBER_ADD"
}

GUILD_MEMBER_REMOVE

{
"d": {
"guild_id": "<string>"
"user": {
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
}
"op": 0
"s": <integer>
"t": "GUILD_MEMBER_REMOVE"
}

GUILD_MEMBER_UPDATE

{
"d": {
"guild_id": "<string>"
"roles": [
"<string>"
...
]
"user": {
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
}
"op": 0
"s": <integer>
"t": "GUILD_MEMBER_UPDATE"
}

GUILD_ROLE_CREATE few samples

{
"d": {
"guild_id": "<string>"
"role": {
"color": 0
"hoist": false
"id": "<string>"
"managed": <boolean> optional
"name": "<string>"
"permissions": 36953089
"position": <integer>
}
}
"op": 0
"s": <integer>
"t": "GUILD_ROLE_CREATE"
}

GUILD_ROLE_DELETE few samples

{
"d": {
"guild_id": "<string>"
"role_id": "<string>"
}
"op": 0
"s": <integer>
"t": "GUILD_ROLE_DELETE"
}

GUILD_ROLE_UPDATE

{
"d": {
"guild_id": "<string>"
"role": {
"color": <integer>
"hoist": <boolean>
"id": "<string>"
"managed": <boolean> optional
"name": "<string>"
"permissions": <integer>
"position": <integer>
}
}
"op": 0
"s": <integer>
"t": "GUILD_ROLE_UPDATE"
}

GUILD_UPDATE few samples

{
"d": {
"afk_channel_id": "<string>" or null
"afk_timeout": <integer>
"embed_channel_id": "<string>" or null
"embed_enabled": <boolean>
"icon": "<string>" or null
"id": "<string>"
"joined_at": "<string>"
"name": "<string>"
"owner_id": "<string>"
"region": "<string>"
"roles": [
{
"color": <integer>
"hoist": <boolean>
"id": "<string>"
"managed": <boolean> optional
"name": "<string>"
"permissions": <integer>
"position": <integer>
}
...
]
}
"op": 0
"s": <integer>
"t": "GUILD_UPDATE"
}

MESSAGE_CREATE

{
"d": {
"attachments": [
{
"filename": "<string>"
"height": <integer> optional
"id": "<string>"
"proxy_url": "<string>"
"size": <integer>
"url": "<string>"
"width": <integer> optional
}
...
]
"author": {
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
"channel_id": "<string>"
"content": "<string>"
"edited_timestamp": null
"embeds": []
"id": "<string>"
"mention_everyone": <boolean>
"mentions": [
{
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
...
]
"nonce": "<string>" or <integer> optional
"timestamp": "<string>"
"tts": <boolean>
}
"op": 0
"s": <integer>
"t": "MESSAGE_CREATE"
}

MESSAGE_DELETE

{
"d": {
"channel_id": "<string>"
"id": "<string>"
}
"op": 0
"s": <integer>
"t": "MESSAGE_DELETE"
}

MESSAGE_UPDATE

{
"d": {
"attachments": []
"author": {
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
"channel_id": "<string>"
"content": "<string>"
"edited_timestamp": "<string>"
"embeds": [
{
"author": { optional
"name": "<string>"
"url": "<string>" or null
}
"description": "<string>" or null
"provider": { optional
"name": "<string>"
"url": "<string>" or null
}
"thumbnail": { optional
"height": <integer>
"proxy_url": "<string>"
"url": "<string>"
"width": <integer>
}
"title": "<string>" or null
"type": "<string>"
"url": "<string>"
"video": { optional
"height": <integer>
"url": "<string>"
"width": <integer>
}
}
...
]
"id": "<string>"
"mention_everyone": <boolean>
"mentions": [
{
"avatar": "<string>" or null
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
...
]
"timestamp": "<string>"
"tts": false
}
"op": 0
"s": <integer>
"t": "MESSAGE_UPDATE"
}

MESSAGE_UPDATE (embeds only)

{
"d": {
"channel_id": "<string>"
"embeds": [
{
"author": { optional
"name": "<string>"
"url": "<string>" or null
}
"description": "<string>" or null
"provider": { optional
"name": "<string>"
"url": "<string>" or null
}
"thumbnail": { optional
"height": "<string>" or <integer>
"proxy_url": "<string>"
"url": "<string>"
"width": "<string>" or <integer>
}
"title": "<string>" or null
"type": "<string>" or null
"url": "<string>"
"video": { optional
"height": <integer>
"url": "<string>"
"width": <integer>
}
}
...
]
"id": "<string>"
}
"op": 0
"s": <integer>
"t": "MESSAGE_UPDATE"
}

OP 7 very few samples

{
"d": {
"url": null
}
"op": 7
"s": null
"t": null
}

PRESENCE_UPDATE

{
"d": {
"game_id": "<string>" or null or <integer>
"guild_id": "<string>"
"roles": [ optional
"<string>"
...
]
"status": "<string>"
"user": {
"avatar": "<string>" or null optional
"discriminator": "<string>" optional
"id": "<string>"
"username": "<string>" optional
}
}
"op": 0
"s": <integer>
"t": "PRESENCE_UPDATE"
}

READY few samples

{
"d": {
"guilds": [
{
"id": "<string>"
"unavailable": true
}
or
{
"afk_channel_id": "<string>" or null
"afk_timeout": <integer>
"channels": [
{
"id": "<string>"
"last_message_id": "<string>" or null
"name": "<string>"
"permission_overwrites": [
{
"allow": <integer>
"deny": <integer>
"id": "<string>"
"type": "<string>"
}
...
]
"position": <integer>
"topic": "<string>" or null
"type": "<string>"
}
...
]
"icon": "<string>" or null
"id": "<string>"
"joined_at": "<string>"
"large": false optional
"members": [
{
"deaf": false
"joined_at": "<string>"
"mute": <boolean>
"roles": [
"<string>"
...
]
"user": {
"avatar": "<string>" or null
"discriminator": "<string>" or <integer>
"id": "<string>"
"username": "<string>"
}
}
...
]
"name": "<string>"
"owner_id": "<string>"
"presences": [
{
"game_id": null or <integer>
"status": "<string>"
"user": {
"id": "<string>"
}
}
...
]
"region": "<string>"
"roles": [
{
"color": <integer>
"hoist": <boolean>
"id": "<string>"
"managed": <boolean> optional
"name": "<string>"
"permissions": <integer>
"position": <integer>
}
...
]
"voice_states": [
{
"channel_id": "<string>"
"deaf": false
"mute": false
"self_deaf": <boolean>
"self_mute": <boolean>
"session_id": "[REDACTED]"
"suppress": <boolean>
"token": "[REDACTED]" optional
"user_id": "<string>"
}
...
]
}
...
]
"heartbeat_interval": 41250
"private_channels": [
{
"id": "<string>"
"is_private": true
"last_message_id": "<string>"
"recipient": {
"avatar": "<string>"
"discriminator": "<string>"
"id": "<string>"
"username": "<string>"
}
}
...
]
"read_state": [
{
"id": "<string>"
"last_message_id": "<string>" optional
"mention_count": <integer>
}
...
]
"session_id": "[REDACTED]"
"user": {
"avatar": null
"discriminator": "1684"
"email": "logger@hornwitser.no"
"id": "103904748394000384"
"username": "Logger"
"verified": false
}
"v": 3
}
"op": 0
"s": 1
"t": "READY"
}

TYPING_START

{
"d": {
"channel_id": "<string>"
"timestamp": <integer>
"user_id": "<string>"
}
"op": 0
"s": <integer>
"t": "TYPING_START"
}

USER_SETTINGS_UPDATE few samples

{
"d": {
"inline_attachment_media": <boolean> optional
"inline_embed_media": <boolean> optional
"muted_channels": [ optional
"<string>"
...
]
"render_embeds": <boolean> optional
"theme": "<string>" optional
}
"op": 0
"s": <integer>
"t": "USER_SETTINGS_UPDATE"
}

VOICE_STATE_UPDATE

{
"d": {
"channel_id": "<string>" or null
"deaf": <boolean>
"guild_id": "<string>"
"mute": <boolean>
"self_deaf": null or <boolean>
"self_mute": null or <boolean>
"session_id": "[REDACTED]"
"suppress": <boolean>
"token": "[REDACTED]" optional
"user_id": "<string>"
}
"op": 0
"s": <integer>
"t": "VOICE_STATE_UPDATE"
}