Server Payload
Pandemonium websocket payloads sent by the server to the client.
Pong
A Client Payload PING
payload response.
Field | Type | Description |
---|---|---|
op | “PONG” | The op of this ServerPayload variant. |
Example
{
"op": "PONG"
}
Rate Limit
The event 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 ServerPayload 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 |
Example
{
"op": "RATE_LIMIT",
"d": {
"wait": 1010 // 1.01 seconds
}
}
Hello
The payload sent by the server when you initiate a new gateway connection.
Field | Type | Description |
---|---|---|
op | “HELLO” | The op of this ServerPayload 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 |
pandemonium_info | PandemoniumConf | The pandemonium-related configuration and 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
},
"pandemonium_info": {
"url": "https://example.com",
"rate_limit": {
"reset_after": 10,
"limit": 5
}
}
}
}
Message Create
The event sent when the client receives a Message.
Field | Type | Description |
---|---|---|
op | “MESSAGE_CREATE” | The op of this ServerPayload variant. |
d | Message | The data of this variant |
Example
{
"op": "MESSAGE_CREATE",
"d": {
"author": "A Certain Woo",
"content": "Woo!"
}
}