Pandemonium websocket payloads sent by the server to the client.
A Client Payload PING
payload response.
Field | Type | Description |
---|
op | "PONG" | The op of this Server Payload variant. |
{
"op": "PONG"
}
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.
Field | Type | Description |
---|
op | "RATE_LIMIT" | The op of this Server Payload variant. |
d | Rate Limit Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
wait | Number | The amount of milliseconds you have to wait before the rate limit ends |
{
"op": "RATE_LIMIT",
"d": {
"wait": 1010
}
}
The payload sent by the server when you initiate a new gateway connection.
Field | Type | Description |
---|
op | "HELLO" | The op of this Server Payload variant. |
d | Hello Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
heartbeat_interval | Number | The amount of milliseconds your ping interval is supposed to be. |
instance_info | InstanceInfo | The instance’s info.
This is the same payload you get from the Get Instance Info payload without ratelimits |
rate_limit | RateLimitConf | The pandemonium ratelimit info. |
{
"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
}
}
}
The payload sent when the client has successfully authenticated. This contains the data the
user needs on startup.
Field | Type | Description |
---|
op | "AUTHENTICATED" | The op of this Server Payload variant. |
d | Authenticated Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
user | User | |
spheres | Array of Spheres | The spheres that the user is a part of. |
{
"op": "AUTHENTICATED",
"user": {
"id": 48615849987334,
"username": "barbaz",
"social_credit": 3,
"badges": 0,
"permissions": 0
},
"spheres": [ ... ]
}
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.
Field | Type | Description |
---|
op | "USER_UPDATE" | The op of this Server Payload variant. |
d | User | The data of this variant |
{
"id": 48615849987333,
"username": "foobar",
"social_credit": 42,
"badges": 0,
"permissions": 0
}
The payload sent when a user’s presence is updated.
This is mainly used for when a user goes offline or online.
Field | Type | Description |
---|
op | "PRESENCE_UPDATE" | The op of this Server Payload variant. |
d | Presence Update Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
user_id | Number | |
status | Status | |
{
"user_id": 48615849987333,
"status": {
"type": "IDLE",
"text": "BURY THE LIGHT DEEP WITHIN"
}
}
The payload sent when the client receives a Message.
Field | Type | Description |
---|
op | "MESSAGE_CREATE" | The op of this Server Payload variant. |
d | Message | The data of this variant |
{
"op": "MESSAGE_CREATE",
"d": {
"author": "A Certain Woo",
"content": "Woo!"
}
}
The payload sent when a client joins a sphere.
Field | Type | Description |
---|
op | "SPHERE_JOIN" | The op of this Server Payload variant. |
d | Sphere | The data of this variant |
{
"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": [ ... ]
}
}
Field | Type | Description |
---|
op | "SPHERE_LEAVE" | The op of this Server Payload variant. |
d | Sphere Leave Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
sphere_id | Number | |
The payload sent when another user joins a sphere the client is in.
Field | Type | Description |
---|
op | "SPHERE_MEMBER_JOIN" | The op of this Server Payload variant. |
d | Sphere Member Join Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
user | User | |
sphere_id | Number | |
{
"op": "SPHERE_MEMBER_JOIN",
"d": {
"user": {
"id": 48615849987333,
"username": "foobar",
"social_credit": 42,
"badges": 0,
"permissions": 0
},
"sphere_id": 48615849987337
}
}
Field | Type | Description |
---|
op | "SPHERE_MEMBER_LEAVE" | The op of this Server Payload variant. |
d | Sphere Member Leave Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
user_id | Number | |
sphere_id | Number | |
The payload sent when a category is created in a sphere the client is in.
Field | Type | Description |
---|
op | "CATEGORY_CREATE" | The op of this Server Payload variant. |
d | Category Create Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
category | Category | |
sphere_id | Number | |
{
"op": "CATEGORY_CREATE",
"d": {
"category": {
"id": 5473905934337,
"name": "iberia",
"position": 4,
"channels": []
},
"sphere_id": 5461801828355
}
}
The payload sent when a category is edited in a sphere the client is in.
Field | Type | Description |
---|
op | "CATEGORY_UPDATE" | The op of this Server Payload variant. |
d | Category Update Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
data | CategoryEdit | An object containing the validated changes to the category. |
category_id | Number | The id of the category that was changed. |
sphere_id | Number | The id of the guild in which the category was changed. |
{
"op": "CATEGORY_EDIT",
"d": {
"data": { "name": "hyperion-fumo", "position": null },
"category_id": 5462748233731,
"sphere_id": 5461801828355
}
}
The payload sent when a category is deleted in a sphere the client is in.
Field | Type | Description |
---|
op | "CATEGORY_DELETE" | The op of this Server Payload variant. |
d | Category Delete Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
category_id | Number | The id of the category that was deleted. |
sphere_id | Number | The id of the sphere from which the category was deleted. |
{
"op": "CATEGORY_DELETE",
"d": {
"category_id": 5461814149129,
"sphere_id": 5461801828355
}
}
The payload sent when a channel is created in a sphere the client is in.
Field | Type | Description |
---|
op | "SPHERE_CHANNEL_CREATE" | The op of this Server Payload variant. |
d | Sphere Channel Create Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
channel | SphereChannel | The channel that was created. |
sphere_id | Number | The id of the sphere in which the channel was created. |
{
"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
}
}
The payload sent when a channel is edited in a sphere the client is in.
Field | Type | Description |
---|
op | "SPHERE_CHANNEL_UPDATE" | The op of this Server Payload variant. |
d | Sphere Channel Update Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
data | SphereChannelEdit | An object containing the validated changes to the channel. |
channel_id | Number | The id of the channel that was edited. |
sphere_id | Number | The id of the sphere in which the channel was edited. |
{
"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
}
}
The payload sent when a channel is deleted in a sphere the client is in.
Field | Type | Description |
---|
op | "SPHERE_CHANNEL_DELETE" | The op of this Server Payload variant. |
d | Sphere Channel Delete Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
channel_id | Number | The id of the channel that was deleted. |
sphere_id | Number | The id of the guild from which the channel was deleted. |
{
"op": "SPHERE_CHANNEL_DELETE",
"d": {
"channel_id": 5461813690375,
"sphere_id": 5461801828355
}
}
Field | Type | Description |
---|
op | "SPHERE_UPDATE" | The op of this Server Payload variant. |
d | Sphere Update Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
op | "SPHERE_MEMBER_UPDATE" | The op of this Server Payload variant. |
d | Sphere Member Update Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
data | MemberEdit | |
user_id | Number | |
sphere_id | Number | |
Field | Type | Description |
---|
op | "MESSAGE_DELETE" | The op of this Server Payload variant. |
d | Message Delete Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
channel_id | Number | |
message_id | Number | |
Field | Type | Description |
---|
op | "MESSAGE_UPDATE" | The op of this Server Payload variant. |
d | Message Update Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
channel_id | Number | |
message_id | Number | |
data | MessageEdit | |
Field | Type | Description |
---|
op | "MESSAGE_EMBED_POPULATE" | The op of this Server Payload variant. |
d | Message Embed Populate Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
channel_id | Number | |
message_id | Number | |
embeds | Array of Embeds | |
Field | Type | Description |
---|
op | "EMOJI_CREATE" | The op of this Server Payload variant. |
d | Emoji Create Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
sphere_id | Number | |
emoji | Emoji | |
Field | Type | Description |
---|
op | "EMOJI_UPDATE" | The op of this Server Payload variant. |
d | Emoji Update Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
sphere_id | Number | |
emoji_id | Number | |
data | EmojiEdit | |
Field | Type | Description |
---|
op | "EMOJI_DELETE" | The op of this Server Payload variant. |
d | Emoji Delete Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
sphere_id | Number | |
emoji_id | Number | |
Field | Type | Description |
---|
op | "MESSAGE_REACT" | The op of this Server Payload variant. |
d | Message React Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
channel_id | Number | |
message_id | Number | |
user_id | Number | |
emoji | ReactionEmoji | |
Field | Type | Description |
---|
op | "MESSAGE_REACTION_DELETE" | The op of this Server Payload variant. |
d | Message Reaction Delete Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
channel_id | Number | |
message_id | Number | |
user_id | Number | |
emoji | ReactionEmoji | |
Field | Type | Description |
---|
op | "MESSAGE_REACTION_CLEAR" | The op of this Server Payload variant. |
d | Message Reaction Clear Data | The data of this variant. |
With the data of this variant being:
Field | Type | Description |
---|
channel_id | Number | |
message_id | Number | |