Skip to content

capabilities

capabilities tells the server which optional frames your client can handle on this connection. Send it once after ready. The server uses the list to decide what to send you; it does not change what you are allowed to do.

This is the client’s list. The server’s own list is handshake.val.capabilities, which says which commands and features the server supports.

{
"cmd": "capabilities",
"val": ["channel_get", "server_side_embeds"]
}
Field Type Required Description
val array of strings Yes Capability names the client supports. You can send the array in capabilities instead; the server reads val first. Non-string items are dropped.

The server acts on these names:

Capability Effect
channel_get When one channel’s settings change, you get a channel_get frame for that channel instead of a full channels_get list.
server_side_embeds You receive the message_edit frames the server sends after it builds link previews. See link previews.

The server stores other names without acting on them.

Each capabilities command replaces the previous list for the connection. The list does not carry over to a new connection, so send it again after reconnecting.

None. The server stores the list and sends nothing back.

You must be logged in.

If val (or capabilities) is missing or is not an array, the server returns an error with src: "capabilities" and a validation message in val.