>>

Server Payload

Pandemonium websocket payloads sent by the server to the client.

>>

PONG

A Client Payload PING payload response.

FieldTypeDescription
op"PONG"The op of this Server Payload variant.
>>

Example

{
  "op": "PONG"
}
>>

RATE_LIMIT

The payload sent when the client gets gateway rate limited.

The client is supposed to wait wait milliseconds before sending any more events, otherwise they are disconnected.

FieldTypeDescription
op"RATE_LIMIT"The op of this Server Payload variant.
dRate Limit DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
waitNumberThe amount of milliseconds you have to wait before the rate limit ends
>>

Example

{
  "op": "RATE_LIMIT",
  "d": {
    "wait": 1010 // 1.01 seconds
  }
}
>>

HELLO

The payload sent by the server when you initiate a new gateway connection.

FieldTypeDescription
op"HELLO"The op of this Server Payload variant.
dHello DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
heartbeat_intervalNumberThe amount of milliseconds your ping interval is supposed to be.
instance_infoInstanceInfoThe instance’s info.

This is the same payload you get from the Get Instance Info payload without ratelimits
rate_limitRateLimitConfThe pandemonium ratelimit info.
>>

Example

{
  "op": "HELLO",
  "d": {
    "heartbeat_interval": 45000,
    "instance_info": {
      "instance_name": "EmreLand",
      "description": "More based than Oliver's instance (trust)",
      "version": "0.3.3",
      "message_limit": 2048,
      "oprish_url": "https://example.com",
      "pandemonium_url": "https://example.com",
      "effis_url": "https://example.com",
      "file_size": 20000000,
      "attachment_file_size": 100000000
    },
    "rate_limit": {
      "reset_after": 10,
      "limit": 5
    }
  }
}
>>

AUTHENTICATED

The payload sent when the client has successfully authenticated. This contains the data the user needs on startup.

FieldTypeDescription
op"AUTHENTICATED"The op of this Server Payload variant.
dAuthenticated DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
userUser
spheresArray of SpheresThe spheres that the user is a part of.
>>

Example

{
  "op": "AUTHENTICATED",
  "user": {
    "id": 48615849987334,
    "username": "barbaz",
    "social_credit": 3,
    "badges": 0,
    "permissions": 0
  },
  "spheres": [ ... ]
}
>>

USER_UPDATE

The payload received when a user updates themselves. This includes both user updates from the Edit User endpoint and profile updates from the Edit Profile endpoint.

FieldTypeDescription
op"USER_UPDATE"The op of this Server Payload variant.
dUserThe data of this variant
>>

Example

{
  "id": 48615849987333,
  "username": "foobar",
  "social_credit": 42,
  "badges": 0,
  "permissions": 0
}
>>

PRESENCE_UPDATE

The payload sent when a user’s presence is updated.

This is mainly used for when a user goes offline or online.

FieldTypeDescription
op"PRESENCE_UPDATE"The op of this Server Payload variant.
dPresence Update DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
user_idNumber
statusStatus
>>

Example

{
  "user_id": 48615849987333,
  "status": {
    "type": "IDLE",
    "text": "BURY THE LIGHT DEEP WITHIN"
  }
}
>>

MESSAGE_CREATE

The payload sent when the client receives a Message.

FieldTypeDescription
op"MESSAGE_CREATE"The op of this Server Payload variant.
dMessageThe data of this variant
>>

Example

{
  "op": "MESSAGE_CREATE",
  "d": {
    "author": "A Certain Woo",
    "content": "Woo!"
  }
}
>>

SPHERE_JOIN

The payload sent when a client joins a sphere.

FieldTypeDescription
op"SPHERE_JOIN"The op of this Server Payload variant.
dSphereThe data of this variant
>>

Example

{
  "op": "SPHERE_JOIN",
  "d": {
    "id": 4080402038786,
    "owner_id": 4080403808259,
    "name": "Spehre",
    "type": "HYBRID",
    "description": "Truly the sphere of all time",
    "icon": 4080412852228,
    "badges": 0,
    "channels": [ ... ],
    "members": [ ... ]
  }
}
>>

SPHERE_LEAVE

FieldTypeDescription
op"SPHERE_LEAVE"The op of this Server Payload variant.
dSphere Leave DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
sphere_idNumber
>>

SPHERE_MEMBER_JOIN

The payload sent when another user joins a sphere the client is in.

FieldTypeDescription
op"SPHERE_MEMBER_JOIN"The op of this Server Payload variant.
dSphere Member Join DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
userUser
sphere_idNumber
>>

Example

{
  "op": "SPHERE_MEMBER_JOIN",
  "d": {
    "user": {
      "id": 48615849987333,
      "username": "foobar",
      "social_credit": 42,
      "badges": 0,
      "permissions": 0
    },
    "sphere_id": 48615849987337
  }
}
>>

SPHERE_MEMBER_LEAVE

FieldTypeDescription
op"SPHERE_MEMBER_LEAVE"The op of this Server Payload variant.
dSphere Member Leave DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
user_idNumber
sphere_idNumber
>>

CATEGORY_CREATE

The payload sent when a category is created in a sphere the client is in.

FieldTypeDescription
op"CATEGORY_CREATE"The op of this Server Payload variant.
dCategory Create DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
categoryCategory
sphere_idNumber
>>

Example

{
  "op": "CATEGORY_CREATE",
  "d": {
    "category": {
      "id": 5473905934337,
      "name": "iberia",
      "position": 4,
      "channels": []
    },
    "sphere_id": 5461801828355
  }
}
>>

CATEGORY_UPDATE

The payload sent when a category is edited in a sphere the client is in.

FieldTypeDescription
op"CATEGORY_UPDATE"The op of this Server Payload variant.
dCategory Update DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
dataCategoryEditAn object containing the validated changes to the category.
category_idNumberThe id of the category that was changed.
sphere_idNumberThe id of the guild in which the category was changed.
>>

Example

{
  "op": "CATEGORY_EDIT",
  "d": {
    "data": { "name": "hyperion-fumo", "position": null },
    "category_id": 5462748233731,
    "sphere_id": 5461801828355
  }
}
>>

CATEGORY_DELETE

The payload sent when a category is deleted in a sphere the client is in.

FieldTypeDescription
op"CATEGORY_DELETE"The op of this Server Payload variant.
dCategory Delete DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
category_idNumberThe id of the category that was deleted.
sphere_idNumberThe id of the sphere from which the category was deleted.
>>

Example

{
  "op": "CATEGORY_DELETE",
  "d": {
    "category_id": 5461814149129,
    "sphere_id": 5461801828355
  }
}
>>

SPHERE_CHANNEL_CREATE

The payload sent when a channel is created in a sphere the client is in.

FieldTypeDescription
op"SPHERE_CHANNEL_CREATE"The op of this Server Payload variant.
dSphere Channel Create DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
channelSphereChannelThe channel that was created.
sphere_idNumberThe id of the sphere in which the channel was created.
>>

Example

{
  "op": "SPHERE_CHANNEL_CREATE",
  "d": {
    "channel": {
      "type": "TEXT",
      "id": 5473965965314,
      "sphere_id": 5461801828355,
      "name": "lungmen",
      "topic": "uwoogh",
      "position": 2,
      "category_id": 5462748233731
    },
    "sphere_id": 5461801828355
  }
}
>>

SPHERE_CHANNEL_UPDATE

The payload sent when a channel is edited in a sphere the client is in.

FieldTypeDescription
op"SPHERE_CHANNEL_UPDATE"The op of this Server Payload variant.
dSphere Channel Update DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
dataSphereChannelEditAn object containing the validated changes to the channel.
channel_idNumberThe id of the channel that was edited.
sphere_idNumberThe id of the sphere in which the channel was edited.
>>

Example

{
  "op": "SPHERE_CHANNEL_EDIT",
  "d": {
    "data": {
      "name": "wscat",
      "topic": "dont forget to ping the websocket",
      "position": 3,
      "category_id": 5461801828355
    },
    "channel_id": 5461813690375,
    "sphere_id": 5461801828355
  }
}
>>

SPHERE_CHANNEL_DELETE

The payload sent when a channel is deleted in a sphere the client is in.

FieldTypeDescription
op"SPHERE_CHANNEL_DELETE"The op of this Server Payload variant.
dSphere Channel Delete DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
channel_idNumberThe id of the channel that was deleted.
sphere_idNumberThe id of the guild from which the channel was deleted.
>>

Example

{
  "op": "SPHERE_CHANNEL_DELETE",
  "d": {
    "channel_id": 5461813690375,
    "sphere_id": 5461801828355
  }
}
>>

SPHERE_UPDATE

FieldTypeDescription
op"SPHERE_UPDATE"The op of this Server Payload variant.
dSphere Update DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
dataSphereEdit
sphere_idNumber
>>

SPHERE_MEMBER_UPDATE

FieldTypeDescription
op"SPHERE_MEMBER_UPDATE"The op of this Server Payload variant.
dSphere Member Update DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
dataMemberEdit
user_idNumber
sphere_idNumber
>>

MESSAGE_DELETE

FieldTypeDescription
op"MESSAGE_DELETE"The op of this Server Payload variant.
dMessage Delete DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
channel_idNumber
message_idNumber
>>

MESSAGE_UPDATE

FieldTypeDescription
op"MESSAGE_UPDATE"The op of this Server Payload variant.
dMessage Update DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
channel_idNumber
message_idNumber
dataMessageEdit
>>

MESSAGE_EMBED_POPULATE

FieldTypeDescription
op"MESSAGE_EMBED_POPULATE"The op of this Server Payload variant.
dMessage Embed Populate DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
channel_idNumber
message_idNumber
embedsArray of Embeds
>>

EMOJI_CREATE

FieldTypeDescription
op"EMOJI_CREATE"The op of this Server Payload variant.
dEmoji Create DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
sphere_idNumber
emojiEmoji
>>

EMOJI_UPDATE

FieldTypeDescription
op"EMOJI_UPDATE"The op of this Server Payload variant.
dEmoji Update DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
sphere_idNumber
emoji_idNumber
dataEmojiEdit
>>

EMOJI_DELETE

FieldTypeDescription
op"EMOJI_DELETE"The op of this Server Payload variant.
dEmoji Delete DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
sphere_idNumber
emoji_idNumber
>>

MESSAGE_REACT

FieldTypeDescription
op"MESSAGE_REACT"The op of this Server Payload variant.
dMessage React DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
channel_idNumber
message_idNumber
user_idNumber
emojiReactionEmoji
>>

MESSAGE_REACTION_DELETE

FieldTypeDescription
op"MESSAGE_REACTION_DELETE"The op of this Server Payload variant.
dMessage Reaction Delete DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
channel_idNumber
message_idNumber
user_idNumber
emojiReactionEmoji
>>

MESSAGE_REACTION_CLEAR

FieldTypeDescription
op"MESSAGE_REACTION_CLEAR"The op of this Server Payload variant.
dMessage Reaction Clear DataThe data of this variant.

With the data of this variant being:

FieldTypeDescription
channel_idNumber
message_idNumber