Skip to content
TEBHOS API

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.

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.

ValueDescription
gece-loungeA night lounge with one game table, T01, and four watch seats at it
kahvehaneA coffee house with three game tables, T01 to T03, and two watch seats at each
oyun-odasiA 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.

ValueDescription
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.

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.

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 rack null.
  • 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.

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.

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.

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.

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.

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.

FieldTypeDescription
seat?stringThe seat the connection holds, or null when it stands

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.

FieldTypeDescription
versionintegerThe key version (1-255), the fifth byte of a file sealed with this key
keystringThe AES-256-GCM key, base64 of 32 bytes
GET/v1/voice-rooms/asset-keys

Returns 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.

FieldTypeDescription
keysarray of room file key objectsThe keys, the current one first
StatusBodyCondition
200response bodyThe server has a key
401error responseNo account is signed in
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error responseThe server has no key, returned as FEATURE_TEMPORARILY_DISABLED
429error responseThe rate limit below is spent, returned as RATE_LIMITED
FieldTypeDescription
Cache-ControlstringThe literal value private, no-store

10 requests per minute for each authenticated user, on the voice_room:asset_keys bucket.

PUT/v1/channels/{channel_id}/voice-seat

Seats 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.

  • 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_id passes the voice membership check.
  • A player seated at an active table cannot move to a lounge or watch seat until the game ends.
FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
connection_idstringThe caller’s voice connection in this channel (1-64 characters)
seat?stringA lounge or watch seat of the room, or null to let the server pick a free lounge seat
FieldTypeDescription
seat?stringThe 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.

StatusBodyCondition
200voice seat objectThe connection holds the returned seat, or stands
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
400error responseThe channel has no theme, or the seat is not a lounge or watch seat of it, as VOICE_SEAT_UNKNOWN
400error responseThe connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE
401error responseNo account is signed in
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error response3D rooms are switched off, returned as FEATURE_TEMPORARILY_DISABLED
403error responseThe caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
409error responseAnother connection sits on the seat, returned as VOICE_SEAT_TAKEN
409error responseThe caller sits at an active table, returned as TABLE_GAME_CONFLICT
429error responseThe channel’s cap of 20 seat changes a second is spent, returned as RATE_LIMITED

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.

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.

POST/v1/channels/{channel_id}/voice-seat/character

Shows 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.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
connection_idstringThe caller’s voice connection in this channel (1-64 characters)
StatusBodyCondition
204noneThe attribute was written
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
400error responseThe channel has no theme, returned as VOICE_SEAT_UNKNOWN
400error responseThe connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE
401error responseNo account is signed in
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error responseRoom characters are switched off, returned as FEATURE_TEMPORARILY_DISABLED
403error responseThe caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL

6 requests per minute for each authenticated user and channel ID, on the voice_room:character::channel_id bucket.

PUT/v1/channels/{channel_id}/voice-seat/scene

Marks 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.

  • Opening (open true) 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_id passes the voice membership check.
FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
connection_idstringThe caller’s voice connection in this channel (1-64 characters)
openbooleanWhether that connection shows the 3D room now
StatusBodyCondition
204noneThe attribute was written
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
400error responseopen is true and the channel has no theme, returned as VOICE_SEAT_UNKNOWN
400error responseThe connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE
401error responseNo account is signed in
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error responseopen is true and 3D rooms are switched off, returned as FEATURE_TEMPORARILY_DISABLED
403error responseThe caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
429error responseThe rate limit below is spent, returned as RATE_LIMITED
503error responseThe voice server did not take the write, returned as SERVICE_UNAVAILABLE

20 requests per minute for each authenticated user and channel ID, on the voice_room:scene::channel_id bucket.

PUT/v1/channels/{channel_id}/voice-seat/watch

Plays 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.

  • 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_id passes the voice membership check.
  • url is an https link to one YouTube video on youtube.com, www.youtube.com, m.youtube.com or music.youtube.com (a /watch?v=, /shorts/, /embed/ or /live/ path), or on youtu.be, with no user information or port.
FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
connection_idstringThe caller’s voice connection in this channel (1-64 characters)
urlstringThe YouTube video link to play (1-2048 characters)
position_ms?integerPlayback position in milliseconds, 0 to 86400000 (default 0)
paused?booleanWhether the video stands paused at position_ms (default false)
StatusBodyCondition
204noneThe video plays from the given position, or stands paused there
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
400error responseThe channel has no theme, returned as VOICE_SEAT_UNKNOWN
400error responseurl is not an https YouTube video link, or position_ms is out of range, returned as INVALID_FORM_BODY
400error responseThe connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE
401error responseNo account is signed in
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error response3D rooms or room TV videos are switched off, returned as FEATURE_TEMPORARILY_DISABLED
403error responseThe caller lacks VIEW_CHANNEL, CONNECT or STREAM, or is server-muted, returned as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
429error responseThe rate limit below is spent, returned as RATE_LIMITED
503error responseThe voice server did not take the write, returned as SERVICE_UNAVAILABLE

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.

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.

DELETE/v1/channels/{channel_id}/voice-seat/watch

Stops 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.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
connection_idstringThe caller’s voice connection that plays the video (1-64 characters)
StatusBodyCondition
204noneThe connection plays no video
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
400error responseThe connection is not the caller’s connection in this channel, returned as USER_NOT_IN_VOICE
401error responseNo account is signed in
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error responseThe caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
429error responseThe rate limit below is spent, returned as RATE_LIMITED
503error responseThe voice server did not take the write, returned as SERVICE_UNAVAILABLE

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.

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.

  • 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.
FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
user_idsnowflakeThe ID of the member whose video stops
StatusBodyCondition
204noneThe member’s connections in the channel play no video
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
400error responseThe channel has no theme, returned as VOICE_SEAT_UNKNOWN
400error responseThe member is not in this voice channel, returned as USER_NOT_IN_VOICE
401error responseNo account is signed in
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error response3D rooms or room TV videos are switched off, returned as FEATURE_TEMPORARILY_DISABLED
403error responseThe caller lacks VIEW_CHANNEL or CONNECT, returned as MISSING_PERMISSIONS
403error responseThe caller has neither moderation permission, or no authority over the member, as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
429error responseThe rate limit below is spent, returned as RATE_LIMITED
503error responseThe voice server did not take a write, returned as SERVICE_UNAVAILABLE

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.

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 the stage switch of its voice_room assignment 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.

The document in the room metadata, and the response of Set the voice room stage.

FieldTypeDescription
vintegerThe version of the document, always 1
botstage bot objectThe bot running the stage, from its own account
written_atintegerWhen the server wrote the stage, in milliseconds since the Unix epoch on the server clock
expires_atintegerWhen clients stop showing the stage, in milliseconds since the Unix epoch on the server clock
tv?stage board or stage video objectWhat the room TV shows, or null
host?stage host objectThe host character standing in the room, or null
FieldTypeDescription
idsnowflakeThe user ID of the bot
namestringThe display name of the bot account, or its username when it has none or it is not plain text, cut to 32 characters
avatar?stringThe avatar hash of the bot account (up to 64 characters)
FieldTypeDescription
typestringThe literal value board
stylestringThe board style
titlestringThe heading, up to 60 characters on one line, which can be empty
textstringThe body text, up to 280 characters on at most 4 lines, which can be empty
accent?integerThe accent colour as an RGB integer (0-16777215)
scoresarray[stage score object]The scoreboard rows in the order shown, up to 10
buttons?stage buttons objectThe 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.

ValueDescription
neonA dark board with a glowing accent colour, the default
tahtaA chalkboard
sadeA plain card
FieldTypeDescription
namestringThe name shown on the row when its user is not found in the room (1-32 characters, one line)
valueintegerThe score, from -1000000000 through 1000000000
user_id?snowflakeThe user the row is about. While they are in the room, a client shows their own name and avatar
FieldTypeDescription
message_idsnowflakeThe bot’s message the buttons come from
itemsarray[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.

FieldTypeDescription
custom_idstringThe custom ID of the button (1-100 characters)
labelstringThe label of the button (up to 80 characters, one line)
styleintegerThe button style: 1 primary, 2 secondary, 3 success, 4 danger
disabledbooleanWhether the button is disabled
FieldTypeDescription
typestringThe literal value video
video_idstringThe 11-character YouTube video ID
started_atintegerServer time in milliseconds when the video would have begun to play from its start
paused_at?integerServer 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.

FieldTypeDescription
characterstringThe host character preset
shirtintegerThe shirt colour as an RGB integer (0-16777215)

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.

ValueDescription
tb-gunlukEveryday clothes, the default
tb-dedeGrandpa
tb-doktorDoctor
tb-is-insaniBusiness outfit
tb-kisWinter clothes
tb-ogrenciStudent
tb-polisPolice officer
tb-sanatciArtist
tb-sporcuSportswear
FieldTypeDescription
typestringThe literal value board
style?stringThe board style (default neon)
title??stringThe heading, up to 60 characters on one line
text??stringThe body text, up to 280 characters on at most 4 lines
accent?integerThe 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?snowflakeThe 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.

FieldTypeDescription
typestringThe literal value video
urlstringThe YouTube video link to play (1-2048 characters)
position_ms?integerPlayback position in milliseconds, 0 to 86400000 (default 0)
paused?booleanWhether 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.

FieldTypeDescription
character?1stringA host character preset (default tb-gunluk)
shirt?integerThe 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/v1/channels/{channel_id}/voice-room/stageBot

Returns 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.

  • 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.
FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
stage?voice room stage objectThe stage the room shows now, or null when there is none
StatusBodyCondition
200response bodyThe stage was read, or nobody is in the channel
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
401error responseNo account is signed in
403error responseThe credential is not a bot token, returned as ACCESS_DENIED
403error responseRoom stages are switched off, returned as FEATURE_TEMPORARILY_DISABLED
403error responseThe bot lacks VIEW_CHANNEL or MANAGE_ROOM_STAGE, returned as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
429error responseThe rate limit below is spent, returned as RATE_LIMITED
503error responseThe voice server could not be read, returned as SERVICE_UNAVAILABLE

30 requests per 10 seconds for each bot and channel ID, on the voice_room:stage_read::channel_id bucket.

PUT/v1/channels/{channel_id}/voice-room/stageBot

Replaces 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.

  • 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_BODY with CONTENT_EXCEEDS_MAX_LENGTH on tv.
FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
tv??board or video request objectWhat the room TV shows, or null or absent for nothing from the stage
host??stage host request objectThe host character, or null or absent for none
ttl_seconds?integerSeconds the stage shows before it lapses, 60 to 21600 (default 3600)
StatusBodyCondition
200voice room stage objectThe room shows the returned stage
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
400error responseThe body breaks a rule above, returned as INVALID_FORM_BODY
401error responseNo account is signed in
403error responseThe credential is not a bot token, returned as ACCESS_DENIED
403error responseRoom stages, or room TV videos for a video, are switched off, as FEATURE_TEMPORARILY_DISABLED
403error responseThe bot lacks VIEW_CHANNEL, MANAGE_ROOM_STAGE or STREAM, returned as MISSING_PERMISSIONS
403error responseThe bot is under a communication timeout, returned as COMMUNICATION_DISABLED
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
409error responseNobody is in the voice channel, returned as VOICE_ROOM_NOT_ACTIVE
429error responseA rate limit below is spent, returned as RATE_LIMITED
503error responseThe voice server did not take the write, returned as SERVICE_UNAVAILABLE

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.

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.

DELETE/v1/channels/{channel_id}/voice-room/stageBot

Takes 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.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
StatusBodyCondition
204noneThe room shows no stage, or nobody is in the channel
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
401error responseNo account is signed in
403error responseThe caller lacks the permissions above, returned as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
429error responseA rate limit below is spent, returned as RATE_LIMITED
503error responseThe voice server did not take the write, returned as SERVICE_UNAVAILABLE

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.

POST/v1/channels/{channel_id}/voice-room/stage/effectsBot

Sends 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.

  • 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.
FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
typestringThe stage effect type
user_id?snowflakeThe user the spotlight falls on, for spotlight only
emote?stringwave, dance, jump or emoji, for host_emote only
emoji?1stringOne 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

ValueDescription
confettiConfetti falls over the room, which a client skips when its user asks for reduced motion
spotlightA spotlight falls on user_id, which a client draws only while that user is in the room
host_emoteThe host character waves, dances, jumps or shows emoji, seen only while the stage has a host
StatusBodyCondition
204noneThe voice server took the moment
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
400error responseThe body is not one of the shapes above, returned as INVALID_FORM_BODY
401error responseNo account is signed in
403error responseThe credential is not a bot token, returned as ACCESS_DENIED
403error responseRoom stages are switched off, returned as FEATURE_TEMPORARILY_DISABLED
403error responseThe bot lacks VIEW_CHANNEL or MANAGE_ROOM_STAGE, returned as MISSING_PERMISSIONS
403error responseThe bot is under a communication timeout, returned as COMMUNICATION_DISABLED
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
409error responseNobody is in the voice channel, returned as VOICE_ROOM_NOT_ACTIVE
429error responseA rate limit below is spent, returned as RATE_LIMITED
503error responseThe voice server did not take the moment, returned as SERVICE_UNAVAILABLE

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.

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_id that 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.

Every room tournament route can also answer with these.

StatusBodyCondition
401error responseNo account is signed in
403error responseRoom fights, or table games for arm wrestling, are switched off, as FEATURE_TEMPORARILY_DISABLED
429error responseA rate limit is spent, returned as RATE_LIMITED

Every route but Send a slap arena input also answers with these.

StatusBodyCondition
400error responseThe channel is not a guild voice channel, returned as INVALID_CHANNEL_TYPE
403error responseThe caller lacks a permission the route needs, returned as MISSING_PERMISSIONS
404error responseThe channel does not exist, returned as UNKNOWN_CHANNEL
FieldTypeDescription
vintegerThe version of the document, always 1
idsnowflakeThe ID of the tournament, larger for a later tournament
verintegerThe version of the tournament, which grows with every write
gamestringslap or arm_wrestle
sizeintegerThe most entrants: 4, 8, 16 or 32
statusstringregistration, running, ended or canceled
entrantsarray of snowflakesThe entrants’ user IDs in join order, or in the order a manager set
roundsarray of arrays of room tournament match objectsThe bracket, one array a round
cur?room tournament current match objectThe match called or fought now, or null
champion?snowflakeThe user ID of the winner once the tournament ended, or null
tintegerThe server time of this view, in milliseconds since the Unix epoch
FieldTypeDescription
asnowflakeThe user ID of the first fighter
b?snowflakeThe user ID of the second fighter, or null for a bye
w?stringThe winner’s user ID, an empty string when both are out, or null while not played
FieldTypeDescription
midstringThe match ID, which a check-in and an arena input carry
rintegerThe round index of the match
iintegerThe index of the match within its round
asnowflakeThe user ID of the first fighter
bsnowflakeThe user ID of the second fighter
phasestringcall, fight, paused or result
untilintegerThe server time the phase ends, in milliseconds since the Unix epoch
t0?integerThe server time the fight starts, in milliseconds since the Unix epoch
te?integerThe server time the fight runs out, in milliseconds since the Unix epoch
slot?stringArm wrestling: the table slot the match is pulled at
presentarray of integersTwo flags, 1 when fighter a or b answered the call, else 0
FieldTypeDescription
atsnowflakeThe user ID of the fighter who slapped
tosnowflakeThe user ID of the fighter who was hit
hstringThe hand, l or r
backinteger1 for a slap from behind, else 0
dintegerThe damage taken (0-100)
GET/v1/channels/{channel_id}/voice-room/tournamentBot

Returns 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.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
connection_id?stringThe caller’s voice connection in this channel (1-64 characters)
FieldTypeDescription
If-None-Match?stringAn ETag from an earlier response to this route
FieldTypeDescription
tournament?room tournament objectThe tournament, or null when the channel has none
FieldTypeDescription
ETagstringA strong tag of the tournament ID and version, sent on 200 and on 304
Cache-ControlstringThe literal value private, no-cache
VarystringThe literal value Authorization
StatusBodyCondition
200response bodyThe tournament was read
304emptyThe request sent a matching If-None-Match
400error responseconnection_id fails the membership check, returned as USER_NOT_IN_VOICE
403error responseNo connection_id was sent and the caller lacks MANAGE_ROOM_STAGE, as MISSING_PERMISSIONS

The room tournament common responses also apply.

30 requests per 10 seconds for each authenticated user and channel ID, on the room_tournament:read::channel_id bucket.

POST/v1/channels/{channel_id}/voice-room/tournamentBot

Opens 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.

  • The caller is a manager, as Room tournaments describes.
  • A slap tournament runs only in an arena room.
  • An arm_wrestle tournament runs in a 3D room and needs table, a table slot of the room’s own theme or a floor point.
FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
gamestringslap or arm_wrestle
sizeintegerThe most entrants: 4, 8, 16 or 32
table?objectArm 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 π).

StatusBodyCondition
201room tournament objectThe registration was opened
400error responseThe room is not an arena for slap, or table breaks a rule above, as INVALID_FORM_BODY
403error responseThe account is limited and the request returns ACCOUNT_LIMITED
403error responseThe person is under a communication timeout, returned as COMMUNICATION_DISABLED
409error responseThe channel has a tournament that takes entries or runs, as ROOM_TOURNAMENT_CONFLICT

The room tournament common responses also apply.

The room receives the tournament on tebhos.tourney.v1.

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.

DELETE/v1/channels/{channel_id}/voice-room/tournamentBot

Cancels the registration or the running tournament and its match in progress, and returns 204 with an empty body. No one wins.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
StatusBodyCondition
204emptyThe tournament was canceled
403error responseThe account is limited and the request returns ACCOUNT_LIMITED
403error responseThe person is under a communication timeout, returned as COMMUNICATION_DISABLED
404error responseThe channel has no tournament that takes entries or runs, as UNKNOWN_ROOM_TOURNAMENT

The room tournament common responses also apply.

The room receives the canceled tournament on tebhos.tourney.v1.

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.

PUT/v1/channels/{channel_id}/voice-room/tournament/orderBot

Sets the order the entrants are paired in before the start and returns the room tournament object.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
versionintegerThe tournament ver the order was made against
user_idsarray of snowflakesEvery entrant once, in the new order (2-32 IDs)
StatusBodyCondition
200room tournament objectThe new order was written
400error responseuser_ids is not exactly the entrants, each once, returned as INVALID_FORM_BODY
403error responseThe account is limited and the request returns ACCOUNT_LIMITED
403error responseThe person is under a communication timeout, returned as COMMUNICATION_DISABLED
404error responseThe channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT
409error responseRegistration is closed, or version is not the current one, as ROOM_TOURNAMENT_CONFLICT

The room tournament common responses also apply.

The room receives the tournament on tebhos.tourney.v1.

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.

POST/v1/channels/{channel_id}/voice-room/tournament/startBot

Closes the registration, builds the bracket from exactly the entrants of the version sent, calls the first match, and returns the room tournament object.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
versionintegerThe tournament ver the start was made against
StatusBodyCondition
200room tournament objectThe tournament runs
403error responseThe account is limited and the request returns ACCOUNT_LIMITED
403error responseThe person is under a communication timeout, returned as COMMUNICATION_DISABLED
404error responseThe channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT
409error responseRegistration is closed, version is stale, or fewer than 2 entered, as ROOM_TOURNAMENT_CONFLICT

The room tournament common responses also apply.

The room receives the tournament with its first match called on tebhos.tourney.v1.

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.

PUT/v1/channels/{channel_id}/voice-room/tournament/entrants/@me

Adds the caller to the registration, last in the join order, and returns the room tournament object.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
connection_idstringThe caller’s voice connection in this channel (1-64 characters)
StatusBodyCondition
200room tournament objectThe caller entered
400error responseconnection_id fails the membership check, returned as USER_NOT_IN_VOICE
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error responseThe account is limited and the request returns ACCOUNT_LIMITED
403error responseThe caller is under a communication timeout, returned as COMMUNICATION_DISABLED
404error responseThe channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT
409error responseRegistration is closed or full, or the caller entered already, as ROOM_TOURNAMENT_CONFLICT

The room tournament common responses also apply.

The room receives the tournament on tebhos.tourney.v1.

6 requests per minute for each authenticated user and channel ID, on the shared room_tournament:entry::channel_id bucket.

DELETE/v1/channels/{channel_id}/voice-room/tournament/entrants/@me

Takes 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.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
StatusBodyCondition
204emptyThe caller left the registration
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
404error responseThe channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT
409error responseRegistration is closed, or the caller holds no entry, returned as ROOM_TOURNAMENT_CONFLICT

The room tournament common responses also apply.

The room receives the tournament on tebhos.tourney.v1.

6 requests per minute for each authenticated user and channel ID, on the shared room_tournament:entry::channel_id bucket.

POST/v1/channels/{channel_id}/voice-room/tournament/check-in

Tells 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.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
connection_idstringThe caller’s voice connection in this channel (1-64 characters)
match_idstringThe mid of the match the caller was called to (1-64 characters)
StatusBodyCondition
200room tournament objectThe answer was taken
400error responseconnection_id fails the membership check, returned as USER_NOT_IN_VOICE
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error responseThe account is limited and the request returns ACCOUNT_LIMITED
403error responseThe caller is under a communication timeout, returned as COMMUNICATION_DISABLED
404error responseThe channel has no tournament, returned as UNKNOWN_ROOM_TOURNAMENT
409error responseThe match is not calling the caller, or the caller is in another game, as ROOM_TOURNAMENT_CONFLICT

The room tournament common responses also apply.

The room receives the tournament on tebhos.tourney.v1, and the fight starts once both fighters answered.

6 requests per minute for each authenticated user and channel ID, on the shared room_tournament:entry::channel_id bucket.

POST/v1/channels/{channel_id}/voice-room/arena/input

Reports 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.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel
FieldTypeDescription
mstringThe mid of the match the input belongs to (1-64 characters)
xnumberFloor x in metres (-100 to 100)
znumberFloor z in metres (-100 to 100)
yawnumberHeading in radians (-π to π)
slap?booleanWhether the fighter slaps now, false by default
FieldTypeDescription
statusstringok, idle, countdown, paused, over, not_player or stale_match
mstringThe match ID
hparray of integersThe health of fighter a and fighter b (0-100)
phasestringcountdown, fight, paused or over
t0integerThe server time the fight starts, in milliseconds since the Unix epoch
teintegerThe server time the fight runs out, in milliseconds since the Unix epoch
sintegerThe sequence number shared with the tebhos.arena.v1 packets
last?arena hit objectThis input’s slap when it landed, or null
w?stringThe winner’s user ID, an empty string when both are out, or null while the match runs
tintegerThe 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.

StatusBodyCondition
200response bodyThe input was judged
403error responseThe credential is a bot or OAuth2 bearer token, returned as ACCESS_DENIED
403error responseThe account is limited and the request returns ACCOUNT_LIMITED

The first room tournament common responses table also applies.

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.

24 requests per 2 seconds for each authenticated user and channel ID, on the room_arena:input::channel_id bucket.