Voice seats
A guild voice channel can carry a room theme, which a client can show as a 3D room. The room has named seats, and each voice connection in the channel is either seated or standing. The server owns every seat: it seats a connection when it joins, frees the seat when the connection leaves, and carries each connection’s seat to the rest of the room as a LiveKit participant attribute. The tables in the room are played through Table games.
The seat, character and video routes on this page are user-only and act on the caller’s own voice connection. A bot or OAuth2 bearer credential is refused with 403 ACCESS_DENIED. The room stage routes are for bots, and a moderator can also clear a stage.
Room themes
Section titled “Room themes”Modify channel sets the theme as room_theme, and the channel object reports it. A channel with no theme has no room. This server version defines three themes.
| Value | Description |
|---|---|
| gece-lounge | A night lounge with one game table, T01, and four watch seats at it |
| kahvehane | A coffee house with three game tables, T01 to T03, and two watch seats at each |
| oyun-odasi | A game room with two game tables, T01 and T02, and four watch seats at each |
A theme fixes the lounge seats, the table slots, the watch seats, and the standing places of the room. The client draws them from the theme’s room file, so a theme adds no field to the channel beyond its ID.
Seat names
Section titled “Seat names”| Value | Description |
|---|---|
seat_<G>_<NN> | A lounge seat, where G is a seat group in capital letters and digits and NN two digits, such as seat_A_01 |
seat_T<NN>_<K> | A seat at a game table, where TNN is the table slot and K the position 1-4, such as seat_T01_2 |
seat_T<NN>_Y<K> | A watch seat beside a game table, where K is 1-4, such as seat_T01_Y2 |
A connection on no seat is standing. Table seats are taken by sitting down at a table and are never named to Take a voice seat.
Seat assignment
Section titled “Seat assignment”One account holds at most one seat in a channel, whichever of its connections sits on it.
- When LiveKit confirms that a connection joined, the server seats it on the first free lounge seat in the theme’s order. A player at an active table is seated at the table instead, and a connection that already holds a seat keeps it.
- A second connection of the same account stays standing. Taking a seat from it moves the account’s seat to it and stands the first connection up.
- When a connection leaves, its seat passes to the account’s most recently joined connection that is still in the channel and standing, which keeps the seat across a page reload. Otherwise the seat becomes free.
- A connection that finds the room full stands. The server then frees the seats of connections that are no longer in the channel, at most once per channel every 30 seconds, and tries again.
Sitting down at a game table moves the player’s seat to the table, and the end of the game moves it back to a free lounge seat. The server seats nobody in a channel without a theme.
Watch seats
Section titled “Watch seats”A watch seat sits beside a game table, behind a player’s chair, so that its holder can follow the game from up close. The server never gives one by itself: a connection takes it only by naming it to Take a voice seat, whether or not a game runs at the table.
- A watch seat carries no right at the table. Its holder is a spectator like anyone else, watches through Watch a table game, and receives the public view with
racknull. - A held watch seat stays with its connection when LiveKit reports the same join again.
- Sitting down at the table from a watch seat moves the seat to the table, and the end of the game moves it to a free lounge seat, not back to the watch seat.
- A player at an active table cannot move to a watch seat until the game ends.
- When the channel’s theme changes, a held lounge or watch seat the new theme lacks is dropped the next time the server seats that connection, which then takes a free lounge seat or stands.
Seat attribute
Section titled “Seat attribute”The seat reaches the room through the LiveKit participant attribute tebhos.seat of each participant. Its value is the seat name, and a participant without the attribute, or with an empty one, is standing. A client follows the attribute on the participants it already receives and needs no extra request to show who sits where.
Character attribute
Section titled “Character attribute”While room characters are on, each participant also carries the LiveKit participant attribute tebhos.character, which names the 3D character the client draws for it. Its value is <model_key>;<rrggbb>: the model_key of the worn room character (PUT /users/@me/cosmetics/room-character), a ready-made outfit, or the default outfit’s preset key, then a semicolon and the six lowercase hexadecimal digits of the shirt colour, such as tb-gunluk;d9a441. A participant without the attribute, with a value of another shape or with a key the client does not know, is drawn in the default outfit.
The server writes it when LiveKit confirms a join, and again on Refresh my voice room character. The value comes from the account and is never read from a request. A character the account may no longer wear, or a model this server version does not know, becomes the default outfit.
In the same write the server sets tebhos.outfit, the parts the account wears with PUT /users/@me/cosmetics/room-outfit. Its value is 1; and the part keys in slot order (face, hair, top, bottom, shoes, costume, hat, glasses, accessory), joined by commas, such as 1;tb-yuz-sade,tb-sac-kisa-kahve: at most 9 keys of 1 to 32 lowercase letters, digits and dashes. An empty value removes the attribute: the account wears no part, or wears a room character (a ready-made outfit), which is then drawn instead. A client draws the parts over the default outfit and drops a key it does not know; one that does not read tebhos.outfit, or reads a value of another shape or version, draws tebhos.character.
Video attribute
Section titled “Video attribute”A participant who plays a video on the room TV carries the LiveKit participant attribute tebhos.watch, which every client of the room reads to show that video on its own TV. Its value is yt:<video id>|<started at>|<paused at>|<written at>: the 11-character YouTube video ID, then three times in milliseconds on the server clock. started at is when the video would have begun to play from its start, paused at is when it was paused and empty while it plays, and written at is when the server wrote the value, such as yt:dQw4w9WgXcQ|1760000000000||1760000090000. The shared position is the server time now less started at, or paused at less started at while paused. A participant without the attribute, or with a value of another shape, plays nothing.
The server writes it on Play a video on the room TV and removes it on the two stop routes. The value goes with the connection when it leaves, and the server removes it when the participant loses STREAM. A client shows no video of a server-muted participant.
A value whose written at is before watch_since of the voice_room assignment of Get experiment assignments is stale: room TV videos were switched off and on again since it was written, and a client shows nothing for it. A client that sees the value change while it watches can take written at less the time it received the change as its offset to the server clock.
Scene attribute
Section titled “Scene attribute”A participant whose client shows the 3D room carries the LiveKit participant attribute tebhos.scene with the value 1. The server writes it on Report that I see the 3D room and removes it when the client reports the room closed; it goes with the connection when it leaves. It only counts how many people watch the 3D view, and no client reads it.
Voice membership
Section titled “Voice membership”The routes here and on Table games take a connection_id, the voice state connection_id of one of the caller’s own connections. The request counts only when that connection is in the channel the route names. The server checks it against the join LiveKit confirmed, with no Gateway call.
A request sent in the moment before LiveKit confirms the join falls back to the Gateway voice states, at most once per channel every 30 seconds. A request that loses that window returns 400 USER_NOT_IN_VOICE, and the same request succeeds once the join is confirmed.
Voice seat object
Section titled “Voice seat object”| Field | Type | Description |
|---|---|---|
| seat | ?string | The seat the connection holds, or null when it stands |
Sealed room files
Section titled “Sealed room files”The room, table part and character part files a client draws come from the static CDN under /rooms/, named <name>.<12 hex>.mglb, where the hex digits are the first 12 of the file’s SHA-256. Each one is sealed: the 4 bytes MGLB, one byte naming the key version, a 12-byte nonce, then the AES-256-GCM ciphertext of the GLB file with its 16-byte tag, the first 5 bytes as additional authenticated data. A client gets the keys from Get the keys of the 3D room files once a session, opens each file in memory and never stores the opened file. A file sealed with a key the client was not given, or with any byte changed, does not open, and the room falls back to the flat view.
Room file key object
Section titled “Room file key object”| Field | Type | Description |
|---|---|---|
| version | integer | The key version (1-255), the fifth byte of a file sealed with this key |
| key | string | The AES-256-GCM key, base64 of 32 bytes |
Get the keys of the 3D room files
Section titled “Get the keys of the 3D room files”GET/v1/voice-rooms/asset-keysReturns the keys that open the sealed room files, the current one first, to any signed-in user account, whether or not 3D rooms reach it: the shop and the outfit editor draw the same files. The server keeps the previous key listed while files sealed with it are still in use.
Response body
Section titled “Response body”| Field | Type | Description |
|---|---|---|
| keys | array of room file key objects | The keys, the current one first |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | response body | The server has a key |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | The server has no key, returned as FEATURE_TEMPORARILY_DISABLED |
| 429 | error response | The rate limit below is spent, returned as RATE_LIMITED |
Response headers
Section titled “Response headers”| Field | Type | Description |
|---|---|---|
| Cache-Control | string | The literal value private, no-store |
Rate limit
Section titled “Rate limit”10 requests per minute for each authenticated user, on the voice_room:asset_keys bucket.
Take a voice seat
Section titled “Take a voice seat”PUT/v1/channels/{channel_id}/voice-seatSeats the caller’s connection on a lounge or watch seat of the channel’s room and returns the voice seat object. With seat null the server picks a lounge seat, which is how a client asks for a seat when the automatic one did not arrive.
Limitations
Section titled “Limitations”- The caller needs the access Get channel needs, and CONNECT in the channel.
- The channel is a guild voice channel with a room theme.
connection_idpasses the voice membership check.- A player seated at an active table cannot move to a lounge or watch seat until the game ends.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| connection_id | string | The caller’s voice connection in this channel (1-64 characters) |
| seat | ?string | A lounge or watch seat of the room, or null to let the server pick a free lounge seat |
Response body
Section titled “Response body”| Field | Type | Description |
|---|---|---|
| seat | ?string | The seat the connection now holds, or null when it stands |
When seat is null and the room is full, or the account’s seat is held by another of its connections that is still in the channel, the response is 200 with seat null.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | voice seat object | The connection holds the returned seat, or stands |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 400 | error response | The channel has no theme, or the seat is not a lounge or watch seat of it, as VOICE_SEAT_UNKNOWN |
| 400 | error response | The connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | 3D rooms are switched off, returned as FEATURE_TEMPORARILY_DISABLED |
| 403 | error response | The caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 409 | error response | Another connection sits on the seat, returned as VOICE_SEAT_TAKEN |
| 409 | error response | The caller sits at an active table, returned as TABLE_GAME_CONFLICT |
| 429 | error response | The channel’s cap of 20 seat changes a second is spent, returned as RATE_LIMITED |
Side effects
Section titled “Side effects”The server writes the seat attribute of the caller’s connection. A connection that loses its seat to this request, the caller’s own other connection, has its attribute removed. When two requests move the same connection close together, the attribute ends on the seat the server stored last.
Rate limit
Section titled “Rate limit”10 requests per 10 seconds for each authenticated user and channel ID, on the voice_seat:take::channel_id bucket.
The channel as a whole also takes at most 20 seat changes in each one-second window, from all of its members together, because every change reaches each participant of the room. Every request that passes the voice membership check counts, including one that changes nothing, and a request that fails the check never does. The seats the server gives on a LiveKit join are not counted. A request past the cap returns 429 RATE_LIMITED with a retry_after of 1 second and X-RateLimit-Scope: shared, and without X-RateLimit-Bucket.
Refresh my voice room character
Section titled “Refresh my voice room character”POST/v1/channels/{channel_id}/voice-seat/characterShows the character the account wears now on the caller’s connection, which a client sends after PUT /users/@me/cosmetics/room-character. The server writes the character attribute from the account’s cosmetics and takes nothing from the request.
Limitations
Section titled “Limitations”- The caller needs the access Get channel needs, and CONNECT in the channel.
- The channel is a guild voice channel with a room theme.
connection_idpasses the voice membership check.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| connection_id | string | The caller’s voice connection in this channel (1-64 characters) |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | none | The attribute was written |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 400 | error response | The channel has no theme, returned as VOICE_SEAT_UNKNOWN |
| 400 | error response | The connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | Room characters are switched off, returned as FEATURE_TEMPORARILY_DISABLED |
| 403 | error response | The caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
Rate limit
Section titled “Rate limit”6 requests per minute for each authenticated user and channel ID, on the voice_room:character::channel_id bucket.
Report that I see the 3D room
Section titled “Report that I see the 3D room”PUT/v1/channels/{channel_id}/voice-seat/sceneMarks the caller’s connection as showing the 3D room of the channel, or no longer showing it, and returns 204 with an empty body. The mark serves usage counts only: the server writes the scene attribute of the connection, and no client reads it.
Limitations
Section titled “Limitations”- Opening (
opentrue) needs 3D rooms switched on for the instance and a room theme on the channel. Closing needs neither, so a mark written before either went away can still be removed. - The caller needs the access Get channel needs, and CONNECT in the channel.
- The channel is a guild voice channel.
connection_idpasses the voice membership check.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| connection_id | string | The caller’s voice connection in this channel (1-64 characters) |
| open | boolean | Whether that connection shows the 3D room now |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | none | The attribute was written |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 400 | error response | open is true and the channel has no theme, returned as VOICE_SEAT_UNKNOWN |
| 400 | error response | The connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | open is true and 3D rooms are switched off, returned as FEATURE_TEMPORARILY_DISABLED |
| 403 | error response | The caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 429 | error response | The rate limit below is spent, returned as RATE_LIMITED |
| 503 | error response | The voice server did not take the write, returned as SERVICE_UNAVAILABLE |
Rate limit
Section titled “Rate limit”20 requests per minute for each authenticated user and channel ID, on the voice_room:scene::channel_id bucket.
Play a video on the room TV
Section titled “Play a video on the room TV”PUT/v1/channels/{channel_id}/voice-seat/watchPlays the YouTube video of url on the room TV for everyone in the voice channel, from position_ms, playing or paused, and returns 204 with an empty body. The same call seeks, pauses and resumes. The server writes the video attribute of the caller’s connection, so the video ends when that connection leaves.
Limitations
Section titled “Limitations”- Room TV videos are switched on for the instance, which needs 3D rooms on.
- The caller needs the access Get channel needs, and CONNECT and STREAM in the channel, and is not server-muted.
- The channel is a guild voice channel with a room theme.
connection_idpasses the voice membership check.urlis anhttpslink to one YouTube video onyoutube.com,www.youtube.com,m.youtube.comormusic.youtube.com(a/watch?v=,/shorts/,/embed/or/live/path), or onyoutu.be, with no user information or port.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| connection_id | string | The caller’s voice connection in this channel (1-64 characters) |
| url | string | The YouTube video link to play (1-2048 characters) |
| position_ms? | integer | Playback position in milliseconds, 0 to 86400000 (default 0) |
| paused? | boolean | Whether the video stands paused at position_ms (default false) |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | none | The video plays from the given position, or stands paused there |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 400 | error response | The channel has no theme, returned as VOICE_SEAT_UNKNOWN |
| 400 | error response | url is not an https YouTube video link, or position_ms is out of range, returned as INVALID_FORM_BODY |
| 400 | error response | The connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | 3D rooms or room TV videos are switched off, returned as FEATURE_TEMPORARILY_DISABLED |
| 403 | error response | The caller lacks VIEW_CHANNEL, CONNECT or STREAM, or is server-muted, returned as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 429 | error response | The rate limit below is spent, returned as RATE_LIMITED |
| 503 | error response | The voice server did not take the write, returned as SERVICE_UNAVAILABLE |
Side effects
Section titled “Side effects”The server writes the video attribute of the caller’s connection and no other attribute. It reads STREAM again after the write: when the caller lost it meanwhile, the server removes the attribute again and the request returns 403 MISSING_PERMISSIONS.
Rate limit
Section titled “Rate limit”20 requests per minute for each authenticated user and channel ID, on the voice_room:watch::channel_id bucket, which the two stop routes below share.
Stop my video on the room TV
Section titled “Stop my video on the room TV”DELETE/v1/channels/{channel_id}/voice-seat/watchStops the video the caller plays from one voice connection, and returns 204 with an empty body. It works while room TV videos are switched off too, so a video started before the switch went off can still be stopped.
Limitations
Section titled “Limitations”- The caller needs the access Get channel needs, and CONNECT in the channel.
- The channel is a guild voice channel.
connection_idpasses the voice membership check.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| connection_id | string | The caller’s voice connection that plays the video (1-64 characters) |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | none | The connection plays no video |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 400 | error response | The connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | The caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 429 | error response | The rate limit below is spent, returned as RATE_LIMITED |
| 503 | error response | The voice server did not take the write, returned as SERVICE_UNAVAILABLE |
Rate limit
Section titled “Rate limit”20 requests per minute for each authenticated user and channel ID, on the voice_room:watch::channel_id bucket shared with Play a video on the room TV.
Stop a member’s video on the room TV
Section titled “Stop a member’s video on the room TV”DELETE/v1/channels/{channel_id}/voice-seat/watch/{user_id}Stops the video another member plays on the room TV for everyone, on every voice connection of theirs in this channel, and returns 204 with an empty body.
Limitations
Section titled “Limitations”- Room TV videos are switched on for the instance, which needs 3D rooms on.
- The caller needs the access Get channel needs, CONNECT, and MUTE_MEMBERS or MOVE_MEMBERS in the channel.
- As for muting or moving the member, the caller needs role hierarchy authority over them. The guild owner holds it over everyone, and no other caller holds it over the owner.
- The channel is a guild voice channel with a room theme, and the member is in it.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
| user_id | snowflake | The ID of the member whose video stops |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | none | The member’s connections in the channel play no video |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 400 | error response | The channel has no theme, returned as VOICE_SEAT_UNKNOWN |
| 400 | error response | The member is not in this voice channel, returned as USER_NOT_IN_VOICE |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | 3D rooms or room TV videos are switched off, returned as FEATURE_TEMPORARILY_DISABLED |
| 403 | error response | The caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS |
| 403 | error response | The caller has neither moderation permission, or no authority over the member, as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 429 | error response | The rate limit below is spent, returned as RATE_LIMITED |
| 503 | error response | The voice server did not take a write, returned as SERVICE_UNAVAILABLE |
Rate limit
Section titled “Rate limit”20 requests per minute for each authenticated user and channel ID, on the voice_room:watch::channel_id bucket shared with Play a video on the room TV.
Room stage
Section titled “Room stage”A bot can run the stage of a guild voice channel’s 3D room: a board or a YouTube video on the room TV, a host character standing in the room, and one-off moments such as confetti.
The bot writes the whole stage with Set the voice room stage. The server checks it, adds the bot’s own name and avatar, and writes it to the LiveKit room metadata as {"stage": <voice room stage object>}. LiveKit carries the metadata to every participant of the room, and to a participant who joins later as it connects. A moment from Show a voice room stage effect reaches the room as a reliable LiveKit data packet that the server sends on the topic tebhos.stage.fx, with the request body as its payload. Nothing of the stage is stored in a database.
- The stage lives with the LiveKit room. While nobody is in the channel there is no room: a stage write or an effect returns 409
VOICE_ROOM_NOT_ACTIVE, a read returns no stage, and a clear has nothing to do. When the room ends, the stage goes with it. - One channel has one stage. A write replaces it whole, whichever bot wrote it before.
- A client shows no stage after its
expires_at, no stage from a bot its user blocked, and none while thestageswitch of itsvoice_roomassignment is off. Metadata of another shape, or over 4096 bytes, is no stage. - A client takes a stage effect only from a packet with no sending participant, which only the server can send, and drops a payload of another shape or over 256 bytes. It shows an effect only while the room shows a stage, so an effect sent with no stage returns 204 and nobody sees it.
- A client’s TV shows the stage first while nobody in the room shares a screen. While someone does, the TV shows the screenshare first and the stage is one pick away in the TV source picker.
- A client draws no host character while the bot account itself is in the voice channel, whose own voice character shows instead. In a full room the host comes last within the client’s character limit, after every real participant.
- The bot cannot move, seat or dress anyone, and the stage changes no one’s permissions.
Voice room stage object
Section titled “Voice room stage object”The document in the room metadata, and the response of Set the voice room stage.
| Field | Type | Description |
|---|---|---|
| v | integer | The version of the document, always 1 |
| bot | stage bot object | The bot running the stage, from its own account |
| written_at | integer | When the server wrote the stage, in milliseconds since the Unix epoch on the server clock |
| expires_at | integer | When clients stop showing the stage, in milliseconds since the Unix epoch on the server clock |
| tv | ?stage board or stage video object | What the room TV shows, or null |
| host | ?stage host object | The host character standing in the room, or null |
Stage bot object
Section titled “Stage bot object”| Field | Type | Description |
|---|---|---|
| id | snowflake | The user ID of the bot |
| name | string | The display name of the bot account, or its username when it has none or it is not plain text, cut to 32 characters |
| avatar | ?string | The avatar hash of the bot account (up to 64 characters) |
Stage board object
Section titled “Stage board object”| Field | Type | Description |
|---|---|---|
| type | string | The literal value board |
| style | string | The board style |
| title | string | The heading, up to 60 characters on one line, which can be empty |
| text | string | The body text, up to 280 characters on at most 4 lines, which can be empty |
| accent | ?integer | The accent colour as an RGB integer (0-16777215) |
| scores | array[stage score object] | The scoreboard rows in the order shown, up to 10 |
| buttons | ?stage buttons object | The buttons copied from the bot’s message, or null |
Every string of the stage is plain text. It holds no C0 or C1 control character, the line breaks of text aside, no line or paragraph separator (U+2028, U+2029), no direction mark, override or isolate (U+200E, U+200F, U+061C, U+202A to U+202E, U+2066 to U+2069), and no U+200B, U+2060 or U+FEFF. The zero-width joiner and non-joiner are allowed, as emoji sequences and several scripts need them. A client shows markdown, links and mentions as the characters they are.
Board styles
Section titled “Board styles”| Value | Description |
|---|---|
| neon | A dark board with a glowing accent colour, the default |
| tahta | A chalkboard |
| sade | A plain card |
Stage score object
Section titled “Stage score object”| Field | Type | Description |
|---|---|---|
| name | string | The name shown on the row when its user is not found in the room (1-32 characters, one line) |
| value | integer | The score, from -1000000000 through 1000000000 |
| user_id | ?snowflake | The user the row is about. While they are in the room, a client shows their own name and avatar |
Stage buttons object
Section titled “Stage buttons object”| Field | Type | Description |
|---|---|---|
| message_id | snowflake | The bot’s message the buttons come from |
| items | array[stage button object] | The buttons, 1 to 5 |
A click on a stage button is a click on the same button of message_id through Click message button, so the bot receives an ordinary component interaction. That route checks the button against the message as it is now, so a stale copy cannot click a button the bot has removed.
Stage button object
Section titled “Stage button object”| Field | Type | Description |
|---|---|---|
| custom_id | string | The custom ID of the button (1-100 characters) |
| label | string | The label of the button (up to 80 characters, one line) |
| style | integer | The button style: 1 primary, 2 secondary, 3 success, 4 danger |
| disabled | boolean | Whether the button is disabled |
Stage video object
Section titled “Stage video object”| Field | Type | Description |
|---|---|---|
| type | string | The literal value video |
| video_id | string | The 11-character YouTube video ID |
| started_at | integer | Server time in milliseconds when the video would have begun to play from its start |
| paused_at | ?integer | Server time in milliseconds when the video was paused, or null while it plays |
The shared position is the server time now less started_at, or paused_at less started_at while paused, as for the video attribute.
Stage host object
Section titled “Stage host object”| Field | Type | Description |
|---|---|---|
| character | string | The host character preset |
| shirt | integer | The shirt colour as an RGB integer (0-16777215) |
Host characters
Section titled “Host characters”The host wears one of the ready-made outfits of the room characters. This server version knows these. An outfit the shop sells cannot be worn by a host, and the catalogue can change, so a key below that goes on sale is refused from then on.
| Value | Description |
|---|---|
| tb-gunluk | Everyday clothes, the default |
| tb-dede | Grandpa |
| tb-doktor | Doctor |
| tb-is-insani | Business outfit |
| tb-kis | Winter clothes |
| tb-ogrenci | Student |
| tb-polis | Police officer |
| tb-sanatci | Artist |
| tb-sporcu | Sportswear |
Stage board request object
Section titled “Stage board request object”| Field | Type | Description |
|---|---|---|
| type | string | The literal value board |
| style? | string | The board style (default neon) |
| title? | ?string | The heading, up to 60 characters on one line |
| text? | ?string | The body text, up to 280 characters on at most 4 lines |
| accent? | integer | The accent colour as an RGB integer (0-16777215) |
| scores? | array[stage score object] | Up to 10 rows in the order shown, where user_id can be left out |
| message_id? | snowflake | The bot’s own message in this channel whose buttons the board shows |
A board needs a non-empty title, a non-empty text or at least one row of scores. An empty or null title or text is taken as empty. The server trims each string before it checks it.
The server reads the message of message_id, which must be in this channel and written by the calling bot, not by a webhook. It copies the first 5 buttons in the message’s action rows that carry a custom_id and a style from 1 to 4, and leaves link buttons out. A message that is not found or not the bot’s, that has no such button, or whose copied label is not plain text on one line returns 400 INVALID_FORM_BODY with INVALID_MESSAGE_DATA on tv.message_id.
Stage video request object
Section titled “Stage video request object”| Field | Type | Description |
|---|---|---|
| type | string | The literal value video |
| url | string | The YouTube video link to play (1-2048 characters) |
| position_ms? | integer | Playback position in milliseconds, 0 to 86400000 (default 0) |
| paused? | boolean | Whether the video stands paused at position_ms (default false) |
url follows the rule of Play a video on the room TV, and only its video ID is kept. A link of another kind returns 400 INVALID_FORM_BODY with INVALID_URL_FORMAT on tv.url.
Stage host request object
Section titled “Stage host request object”| Field | Type | Description |
|---|---|---|
| character?1 | string | A host character preset (default tb-gunluk) |
| shirt? | integer | The shirt colour as an RGB integer (default the preset’s own colour) |
1 A key that is not a preset of this server version returns 400 INVALID_FORM_BODY with INVALID_FORMAT on host.character, and a preset the shop sells is refused with 400 as well. Shop parts cannot be worn by a host. An empty host object gives the default character with its own shirt
Get the voice room stage
Section titled “Get the voice room stage”GET/v1/channels/{channel_id}/voice-room/stageReturns the stage the channel’s room shows now. A stage past its expires_at reads as none, and so does every stage while nobody is in the channel.
Limitations
Section titled “Limitations”- The credential is a bot token.
- Room stages are switched on.
- The bot needs VIEW_CHANNEL and MANAGE_ROOM_STAGE in the channel, which is a guild voice channel.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
Response body
Section titled “Response body”| Field | Type | Description |
|---|---|---|
| stage | ?voice room stage object | The stage the room shows now, or null when there is none |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | response body | The stage was read, or nobody is in the channel |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is not a bot token, returned as ACCESS_DENIED |
| 403 | error response | Room stages are switched off, returned as FEATURE_TEMPORARILY_DISABLED |
| 403 | error response | The bot lacks VIEW_CHANNEL or MANAGE_ROOM_STAGE, returned as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 429 | error response | The rate limit below is spent, returned as RATE_LIMITED |
| 503 | error response | The voice server could not be read, returned as SERVICE_UNAVAILABLE |
Rate limit
Section titled “Rate limit”30 requests per 10 seconds for each bot and channel ID, on the voice_room:stage_read::channel_id bucket.
Set the voice room stage
Section titled “Set the voice room stage”PUT/v1/channels/{channel_id}/voice-room/stageReplaces the stage of the channel’s room and returns the new voice room stage object. A part the body leaves out or sends as null is gone afterwards: a body with only host takes the board off the TV.
Limitations
Section titled “Limitations”- The credential is a bot token.
- Room stages are switched on.
- The bot needs VIEW_CHANNEL and MANAGE_ROOM_STAGE in the channel, which is a guild voice channel, and STREAM as well for a video.
- A video also needs room TV videos switched on, or the request returns 403
FEATURE_TEMPORARILY_DISABLED. - The bot is not under a communication timeout.
- Someone is in the voice channel, so its LiveKit room exists.
- The encoded stage is at most 4096 bytes, or the request returns 400
INVALID_FORM_BODYwithCONTENT_EXCEEDS_MAX_LENGTHontv.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| tv? | ?board or video request object | What the room TV shows, or null or absent for nothing from the stage |
| host? | ?stage host request object | The host character, or null or absent for none |
| ttl_seconds? | integer | Seconds the stage shows before it lapses, 60 to 21600 (default 3600) |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | voice room stage object | The room shows the returned stage |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 400 | error response | The body breaks a rule above, returned as INVALID_FORM_BODY |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is not a bot token, returned as ACCESS_DENIED |
| 403 | error response | Room stages, or room TV videos for a video, are switched off, as FEATURE_TEMPORARILY_DISABLED |
| 403 | error response | The bot lacks VIEW_CHANNEL, MANAGE_ROOM_STAGE or STREAM, returned as MISSING_PERMISSIONS |
| 403 | error response | The bot is under a communication timeout, returned as COMMUNICATION_DISABLED |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 409 | error response | Nobody is in the voice channel, returned as VOICE_ROOM_NOT_ACTIVE |
| 429 | error response | A rate limit below is spent, returned as RATE_LIMITED |
| 503 | error response | The voice server did not take the write, returned as SERVICE_UNAVAILABLE |
Side effects
Section titled “Side effects”The server writes the room metadata of the channel’s LiveKit room and nothing else. When two writes reach the same room close together, the room keeps the one the voice server took last.
Rate limit
Section titled “Rate limit”10 requests per 10 seconds for each bot and channel ID, on the voice_room:stage_write::channel_id bucket, which Clear the voice room stage shares.
The channel as a whole also takes at most 10 stage events in each 10-second window, from all bots together, because every event reaches each participant of the room. A stage write, an effect and a bot’s clear each count as one. The cap is spent last, after every check of the permissions and the body, the message read, the 4096-byte check and the room check, so a request that returns 400 or 409 spends none of it. A request past the cap returns 429 RATE_LIMITED with X-RateLimit-Scope: shared.
Clear the voice room stage
Section titled “Clear the voice room stage”DELETE/v1/channels/{channel_id}/voice-room/stageTakes the stage off the channel’s room and returns 204 with an empty body. It works while room stages are switched off, so a stage written earlier can still be taken down, and it returns 204 too while nobody is in the channel.
Limitations
Section titled “Limitations”- The caller needs VIEW_CHANNEL and one of MUTE_MEMBERS, MOVE_MEMBERS or MANAGE_CHANNELS in the channel.
- A bot can use MANAGE_ROOM_STAGE instead of those three.
- The channel is a guild voice channel.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | none | The room shows no stage, or nobody is in the channel |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 401 | error response | No account is signed in |
| 403 | error response | The caller lacks the permissions above, returned as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 429 | error response | A rate limit below is spent, returned as RATE_LIMITED |
| 503 | error response | The voice server did not take the write, returned as SERVICE_UNAVAILABLE |
Rate limit
Section titled “Rate limit”10 requests per 10 seconds for each authenticated identity and channel ID, on the voice_room:stage_write::channel_id bucket shared with Set the voice room stage. A bot’s clear also counts toward the channel cap of that route, and a person’s does not.
Show a voice room stage effect
Section titled “Show a voice room stage effect”POST/v1/channels/{channel_id}/voice-room/stage/effectsSends one moment to everyone in the channel’s room and returns 204 with an empty body. The moment is not stored, so a participant who joins later does not see it, and clients show it only while the room shows a stage.
Limitations
Section titled “Limitations”- The credential is a bot token.
- Room stages are switched on.
- The bot needs VIEW_CHANNEL and MANAGE_ROOM_STAGE in the channel, which is a guild voice channel.
- The bot is not under a communication timeout.
- Someone is in the voice channel, so its LiveKit room exists.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| type | string | The stage effect type |
| user_id? | snowflake | The user the spotlight falls on, for spotlight only |
| emote? | string | wave, dance, jump or emoji, for host_emote only |
| emoji?1 | string | One Unicode emoji (1-16 characters), for the emoji emote only |
1 The server checks it as well: a value that is not one Unicode emoji returns 400 INVALID_FORM_BODY with NOT_A_VALID_UNICODE_EMOJI on emoji. The server does not check that user_id is in the room
Stage effect types
Section titled “Stage effect types”| Value | Description |
|---|---|
| confetti | Confetti falls over the room, which a client skips when its user asks for reduced motion |
| spotlight | A spotlight falls on user_id, which a client draws only while that user is in the room |
| host_emote | The host character waves, dances, jumps or shows emoji, seen only while the stage has a host |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | none | The voice server took the moment |
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 400 | error response | The body is not one of the shapes above, returned as INVALID_FORM_BODY |
| 401 | error response | No account is signed in |
| 403 | error response | The credential is not a bot token, returned as ACCESS_DENIED |
| 403 | error response | Room stages are switched off, returned as FEATURE_TEMPORARILY_DISABLED |
| 403 | error response | The bot lacks VIEW_CHANNEL or MANAGE_ROOM_STAGE, returned as MISSING_PERMISSIONS |
| 403 | error response | The bot is under a communication timeout, returned as COMMUNICATION_DISABLED |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
| 409 | error response | Nobody is in the voice channel, returned as VOICE_ROOM_NOT_ACTIVE |
| 429 | error response | A rate limit below is spent, returned as RATE_LIMITED |
| 503 | error response | The voice server did not take the moment, returned as SERVICE_UNAVAILABLE |
Rate limit
Section titled “Rate limit”10 requests per 10 seconds for each bot and channel ID, on the voice_room:stage_effect::channel_id bucket. Each moment also counts toward the channel cap of Set the voice room stage.
Room tournaments
Section titled “Room tournaments”A guild voice channel’s room can hold one 1v1 tournament at a time: slap, fought in an arena room, or arm_wrestle, pulled at a table of the room or at a table the server opens on the floor. A manager opens the registration, the people in the voice channel enter it, and the manager starts it. Entrants are paired in join order, 1-2, 3-4 and so on, and an odd last entrant gets a bye. The server calls each match in turn, referees it, and moves the winner on until one champion is left.
The server holds the tournament and sends the whole room tournament object to the room as a reliable LiveKit data packet on the topic tebhos.tourney.v1, at most 5 a second for each channel. A state over that rate waits for the server’s timer, and the end of a tournament is always sent. A slap match sends its hits and its end on the topic tebhos.arena.v1.
- Managers are people or bots with VIEW_CHANNEL and MANAGE_ROOM_STAGE in the channel. A person under a communication timeout cannot manage.
- Entrants are people only. Entering and answering a match call need CONNECT, no communication timeout, and a
connection_idthat passes the voice membership check. - A called fighter has 60 seconds to answer, or forfeits. Leaving the voice channel before the start drops an entry.
- An ended or canceled tournament stays readable for 10 minutes, and a new one replaces it.
Room tournament common responses
Section titled “Room tournament common responses”Every room tournament route can also answer with these.
| Status | Body | Condition |
|---|---|---|
| 401 | error response | No account is signed in |
| 403 | error response | Room fights, or table games for arm wrestling, are switched off, as FEATURE_TEMPORARILY_DISABLED |
| 429 | error response | A rate limit is spent, returned as RATE_LIMITED |
Every route but Send a slap arena input also answers with these.
| Status | Body | Condition |
|---|---|---|
| 400 | error response | The channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE |
| 403 | error response | The caller lacks a permission the route needs, returned as MISSING_PERMISSIONS |
| 404 | error response | The channel does not exist, returned as UNKNOWN_CHANNEL |
Room tournament object
Section titled “Room tournament object”| Field | Type | Description |
|---|---|---|
| v | integer | The version of the document, always 1 |
| id | snowflake | The ID of the tournament, larger for a later tournament |
| ver | integer | The version of the tournament, which grows with every write |
| game | string | slap or arm_wrestle |
| size | integer | The most entrants: 4, 8, 16 or 32 |
| status | string | registration, running, ended or canceled |
| entrants | array of snowflakes | The entrants’ user IDs in join order, or in the order a manager set |
| rounds | array of arrays of room tournament match objects | The bracket, one array a round |
| cur | ?room tournament current match object | The match called or fought now, or null |
| champion | ?snowflake | The user ID of the winner once the tournament ended, or null |
| t | integer | The server time of this view, in milliseconds since the Unix epoch |
Room tournament match object
Section titled “Room tournament match object”| Field | Type | Description |
|---|---|---|
| a | snowflake | The user ID of the first fighter |
| b | ?snowflake | The user ID of the second fighter, or null for a bye |
| w | ?string | The winner’s user ID, an empty string when both are out, or null while not played |
Room tournament current match object
Section titled “Room tournament current match object”| Field | Type | Description |
|---|---|---|
| mid | string | The match ID, which a check-in and an arena input carry |
| r | integer | The round index of the match |
| i | integer | The index of the match within its round |
| a | snowflake | The user ID of the first fighter |
| b | snowflake | The user ID of the second fighter |
| phase | string | call, fight, paused or result |
| until | integer | The server time the phase ends, in milliseconds since the Unix epoch |
| t0? | integer | The server time the fight starts, in milliseconds since the Unix epoch |
| te? | integer | The server time the fight runs out, in milliseconds since the Unix epoch |
| slot? | string | Arm wrestling: the table slot the match is pulled at |
| present | array of integers | Two flags, 1 when fighter a or b answered the call, else 0 |
Arena hit object
Section titled “Arena hit object”| Field | Type | Description |
|---|---|---|
| at | snowflake | The user ID of the fighter who slapped |
| to | snowflake | The user ID of the fighter who was hit |
| h | string | The hand, l or r |
| back | integer | 1 for a slap from behind, else 0 |
| d | integer | The damage taken (0-100) |
Get the room tournament
Section titled “Get the room tournament”GET/v1/channels/{channel_id}/voice-room/tournamentReturns the channel’s tournament while it takes entries or runs, and for 10 minutes after it ended or was canceled, otherwise null. The caller is in the voice channel and sends its connection_id, or holds MANAGE_ROOM_STAGE in the channel.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
Query parameters
Section titled “Query parameters”| Field | Type | Description |
|---|---|---|
| connection_id? | string | The caller’s voice connection in this channel (1-64 characters) |
Request headers
Section titled “Request headers”| Field | Type | Description |
|---|---|---|
| If-None-Match? | string | An ETag from an earlier response to this route |
Response body
Section titled “Response body”| Field | Type | Description |
|---|---|---|
| tournament | ?room tournament object | The tournament, or null when the channel has none |
Response headers
Section titled “Response headers”| Field | Type | Description |
|---|---|---|
| ETag | string | A strong tag of the tournament ID and version, sent on 200 and on 304 |
| Cache-Control | string | The literal value private, no-cache |
| Vary | string | The literal value Authorization |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | response body | The tournament was read |
| 304 | empty | The request sent a matching If-None-Match |
| 400 | error response | connection_id fails the membership check, returned as USER_NOT_IN_VOICE |
| 403 | error response | No connection_id was sent and the caller lacks MANAGE_ROOM_STAGE, as MISSING_PERMISSIONS |
The room tournament common responses also apply.
Rate limit
Section titled “Rate limit”30 requests per 10 seconds for each authenticated user and channel ID, on the room_tournament:read::channel_id bucket.
Open a room tournament
Section titled “Open a room tournament”POST/v1/channels/{channel_id}/voice-room/tournamentOpens the registration of a tournament in the channel’s room and returns the room tournament object. A tournament that ended or was canceled is replaced.
Limitations
Section titled “Limitations”- The caller is a manager, as Room tournaments describes.
- A
slaptournament runs only in an arena room. - An
arm_wrestletournament runs in a 3D room and needstable, a table slot of the room’s own theme or a floor point.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| game | string | slap or arm_wrestle |
| size | integer | The most entrants: 4, 8, 16 or 32 |
| table? | object | Arm wrestling: {"slot": "T01"} for a theme table, or a floor point with x, z and yaw |
A floor point has x and z in metres (-100 to 100) and yaw in radians (-π to π).
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 201 | room tournament object | The registration was opened |
| 400 | error response | The room is not an arena for slap, or table breaks a rule above, as INVALID_FORM_BODY |
| 403 | error response | The account is limited and the request returns ACCOUNT_LIMITED |
| 403 | error response | The person is under a communication timeout, returned as COMMUNICATION_DISABLED |
| 409 | error response | The channel has a tournament that takes entries or runs, as ROOM_TOURNAMENT_CONFLICT |
The room tournament common responses also apply.
Side effects
Section titled “Side effects”The room receives the tournament on tebhos.tourney.v1.
Rate limit
Section titled “Rate limit”10 requests per 10 seconds for each authenticated user and channel ID, on the shared room_tournament:manage::channel_id bucket.
Every manager of the channel together also has 10 writes in each 10-second window. A request past that cap returns 429 RATE_LIMITED with X-RateLimit-Scope: shared.
Cancel a room tournament
Section titled “Cancel a room tournament”DELETE/v1/channels/{channel_id}/voice-room/tournamentCancels the registration or the running tournament and its match in progress, and returns 204 with an empty body. No one wins.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | The tournament was canceled |
| 403 | error response | The account is limited and the request returns ACCOUNT_LIMITED |
| 403 | error response | The person is under a communication timeout, returned as COMMUNICATION_DISABLED |
| 404 | error response | The channel has no tournament that takes entries or runs, as UNKNOWN_ROOM_TOURNAMENT |
The room tournament common responses also apply.
Side effects
Section titled “Side effects”The room receives the canceled tournament on tebhos.tourney.v1.
Rate limit
Section titled “Rate limit”10 requests per 10 seconds for each authenticated user and channel ID, on the shared room_tournament:manage::channel_id bucket, and the channel’s cap of 10 manager writes in each 10-second window.
Reorder the room tournament entrants
Section titled “Reorder the room tournament entrants”PUT/v1/channels/{channel_id}/voice-room/tournament/orderSets the order the entrants are paired in before the start and returns the room tournament object.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| version | integer | The tournament ver the order was made against |
| user_ids | array of snowflakes | Every entrant once, in the new order (2-32 IDs) |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | room tournament object | The new order was written |
| 400 | error response | user_ids is not exactly the entrants, each once, returned as INVALID_FORM_BODY |
| 403 | error response | The account is limited and the request returns ACCOUNT_LIMITED |
| 403 | error response | The person is under a communication timeout, returned as COMMUNICATION_DISABLED |
| 404 | error response | The channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT |
| 409 | error response | Registration is closed, or version is not the current one, as ROOM_TOURNAMENT_CONFLICT |
The room tournament common responses also apply.
Side effects
Section titled “Side effects”The room receives the tournament on tebhos.tourney.v1.
Rate limit
Section titled “Rate limit”10 requests per 10 seconds for each authenticated user and channel ID, on the shared room_tournament:manage::channel_id bucket, and the channel’s cap of 10 manager writes in each 10-second window.
Start a room tournament
Section titled “Start a room tournament”POST/v1/channels/{channel_id}/voice-room/tournament/startCloses the registration, builds the bracket from exactly the entrants of the version sent, calls the first match, and returns the room tournament object.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| version | integer | The tournament ver the start was made against |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | room tournament object | The tournament runs |
| 403 | error response | The account is limited and the request returns ACCOUNT_LIMITED |
| 403 | error response | The person is under a communication timeout, returned as COMMUNICATION_DISABLED |
| 404 | error response | The channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT |
| 409 | error response | Registration is closed, version is stale, or fewer than 2 entered, as ROOM_TOURNAMENT_CONFLICT |
The room tournament common responses also apply.
Side effects
Section titled “Side effects”The room receives the tournament with its first match called on tebhos.tourney.v1.
Rate limit
Section titled “Rate limit”10 requests per 10 seconds for each authenticated user and channel ID, on the shared room_tournament:manage::channel_id bucket, and the channel’s cap of 10 manager writes in each 10-second window.
Enter a room tournament
Section titled “Enter a room tournament”PUT/v1/channels/{channel_id}/voice-room/tournament/entrants/@meAdds the caller to the registration, last in the join order, and returns the room tournament object.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| connection_id | string | The caller’s voice connection in this channel (1-64 characters) |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | room tournament object | The caller entered |
| 400 | error response | connection_id fails the membership check, returned as USER_NOT_IN_VOICE |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | The account is limited and the request returns ACCOUNT_LIMITED |
| 403 | error response | The caller is under a communication timeout, returned as COMMUNICATION_DISABLED |
| 404 | error response | The channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT |
| 409 | error response | Registration is closed or full, or the caller entered already, as ROOM_TOURNAMENT_CONFLICT |
The room tournament common responses also apply.
Side effects
Section titled “Side effects”The room receives the tournament on tebhos.tourney.v1.
Rate limit
Section titled “Rate limit”6 requests per minute for each authenticated user and channel ID, on the shared room_tournament:entry::channel_id bucket.
Leave a room tournament registration
Section titled “Leave a room tournament registration”DELETE/v1/channels/{channel_id}/voice-room/tournament/entrants/@meTakes the caller out of the registration and returns 204 with an empty body. Once the tournament runs, a called fighter who does not come forfeits instead. The route needs neither CONNECT nor the caller’s 3D room rollout, so anyone who entered can leave.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | The caller left the registration |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 404 | error response | The channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT |
| 409 | error response | Registration is closed, or the caller holds no entry, returned as ROOM_TOURNAMENT_CONFLICT |
The room tournament common responses also apply.
Side effects
Section titled “Side effects”The room receives the tournament on tebhos.tourney.v1.
Rate limit
Section titled “Rate limit”6 requests per minute for each authenticated user and channel ID, on the shared room_tournament:entry::channel_id bucket.
Answer a room tournament match call
Section titled “Answer a room tournament match call”POST/v1/channels/{channel_id}/voice-room/tournament/check-inTells the server that a called fighter is here and returns the room tournament object. Once both fighters answered, the match starts. A slap fighter is held for the match from this answer and cannot play at a table meanwhile.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| connection_id | string | The caller’s voice connection in this channel (1-64 characters) |
| match_id | string | The mid of the match the caller was called to (1-64 characters) |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | room tournament object | The answer was taken |
| 400 | error response | connection_id fails the membership check, returned as USER_NOT_IN_VOICE |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | The account is limited and the request returns ACCOUNT_LIMITED |
| 403 | error response | The caller is under a communication timeout, returned as COMMUNICATION_DISABLED |
| 404 | error response | The channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT |
| 409 | error response | The match is not calling the caller, or the caller is in another game, as ROOM_TOURNAMENT_CONFLICT |
The room tournament common responses also apply.
Side effects
Section titled “Side effects”The room receives the tournament on tebhos.tourney.v1, and the fight starts once both fighters answered.
Rate limit
Section titled “Rate limit”6 requests per minute for each authenticated user and channel ID, on the shared room_tournament:entry::channel_id bucket.
Send a slap arena input
Section titled “Send a slap arena input”POST/v1/channels/{channel_id}/voice-room/arena/inputReports a slap fighter’s position, 4 times a second, and each slap at once, for the current match. The server alone decides hits, health, a knockout and the winner, and the response carries the match as the server holds it. The route reads no channel permission: the server matches the caller and m against the fighters of the match. Positions are kept only for the match.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the voice channel |
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| m | string | The mid of the match the input belongs to (1-64 characters) |
| x | number | Floor x in metres (-100 to 100) |
| z | number | Floor z in metres (-100 to 100) |
| yaw | number | Heading in radians (-π to π) |
| slap? | boolean | Whether the fighter slaps now, false by default |
Response body
Section titled “Response body”| Field | Type | Description |
|---|---|---|
| status | string | ok, idle, countdown, paused, over, not_player or stale_match |
| m | string | The match ID |
| hp | array of integers | The health of fighter a and fighter b (0-100) |
| phase | string | countdown, fight, paused or over |
| t0 | integer | The server time the fight starts, in milliseconds since the Unix epoch |
| te | integer | The server time the fight runs out, in milliseconds since the Unix epoch |
| s | integer | The sequence number shared with the tebhos.arena.v1 packets |
| last | ?arena hit object | This input’s slap when it landed, or null |
| w | ?string | The winner’s user ID, an empty string when both are out, or null while the match runs |
| t | integer | The server time of this response, in milliseconds since the Unix epoch |
A caller who is not a fighter of the current match gets 200 with status not_player or stale_match.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | response body | The input was judged |
| 403 | error response | The credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED |
| 403 | error response | The account is limited and the request returns ACCOUNT_LIMITED |
The first room tournament common responses table also applies.
Side effects
Section titled “Side effects”A slap that lands reaches the room as a hit packet on tebhos.arena.v1, and a knockout as an end packet, which also settles the match in the tournament.
Rate limit
Section titled “Rate limit”24 requests per 2 seconds for each authenticated user and channel ID, on the room_arena:input::channel_id bucket.