Update docs for the debug web UI, voice plan, and current status
This commit is contained in:
+22
-4
@@ -56,14 +56,28 @@ Event line:
|
||||
| --- | --- | --- |
|
||||
| `ping` | none | `"pong"` |
|
||||
| `events.subscribe` | none | `{ "subscribed": true }`. The socket becomes an event subscriber. |
|
||||
| `state.get` | none | The current user, the guilds, and the channels. Cache-only. |
|
||||
| `voice.get` | optional `userId`, optional `guildId` | The voice channel and its members, or `channelId: null` |
|
||||
| `state.get` | none | The current user, the guilds, and the channels. Cache-only. Includes user avatars and guild icons. |
|
||||
| `voice.get` | optional `userId`, optional `guildId` | The voice channel and its members, or `channelId: null`. Without `guildId` it searches all guilds. |
|
||||
| `voice.overview` | `guildId` | The occupied voice channels in the guild and their members |
|
||||
| `user.search` | `query`, optional `guildId`, optional `limit` | Users from the client cache. Guild members when `guildId` is set. |
|
||||
| `dm.list` | optional `limit` | Cached DM and group DM channels with recipients, icons, and avatars. Cache-only. |
|
||||
| `message.send` | `channelId`, `content` | `{ channelId, messageId, sent: true }` |
|
||||
| `message.read` | `channelId`, `limit` | `{ cached, messages }`. Cache-only. |
|
||||
| `message.fetch` | `channelId`, `limit`, optional `before` or `after` | `{ fetched, messages }`. Fetches from Discord. |
|
||||
| `message.read` | `channelId`, `limit` | `{ cached, messages }`. Cache-only. Messages include the author avatar and attachment CDN links. |
|
||||
| `message.fetch` | `channelId`, `limit`, optional `before` or `after` | `{ fetched, messages }`. Fetches from Discord. Same message shape. |
|
||||
| `reaction.add` | `channelId`, `messageId`, `emoji` | `{ added: true }` |
|
||||
| `dm.send` | `userId`, `content` | `{ userId, channelId, sent: true }` |
|
||||
|
||||
## Events
|
||||
|
||||
The renderer normalizes client events and pushes them to subscribers.
|
||||
|
||||
| Event | Payload |
|
||||
| --- | --- |
|
||||
| `MESSAGE_CREATE` | Message ID, channel, guild, channel type, author, content, mentions, timestamp |
|
||||
| `MESSAGE_REACTION_ADD` | Message ID, channel, guild, user, emoji |
|
||||
| `MESSAGE_REACTION_REMOVE` | Same fields as add |
|
||||
| `VOICE_STATE_UPDATE` | User, channel, guild, session, mute, deaf, self-mute, self-deaf |
|
||||
|
||||
## Validation rules
|
||||
|
||||
The core validates all input. The daemon cannot bypass these rules.
|
||||
@@ -79,6 +93,10 @@ The core validates all input. The daemon cannot bypass these rules.
|
||||
- `before` and `after` must be snowflakes. They are mutually exclusive. `message.fetch` uses them
|
||||
to walk history.
|
||||
- `voice.get` accepts snowflakes only. It reads the client cache. It never joins a call.
|
||||
- `voice.overview` requires a guild snowflake. It reads the client cache.
|
||||
- `user.search` takes a query of 1 to 100 characters and a limit of 1 to 25. It reads the client
|
||||
cache only. An exact snowflake query returns that user when cached.
|
||||
- `dm.list` takes a limit of 1 to 50. It reads `ChannelStore.getSortedPrivateChannels()` only.
|
||||
- `reaction.add` accepts a short emoji string without line breaks. It counts as an outbound action
|
||||
for the rate limit.
|
||||
- A request line must not be larger than 64 KiB.
|
||||
|
||||
Reference in New Issue
Block a user