typing
typing tells everyone who can see a channel or thread that you are typing. Send it while the user types, and again before the indicator runs out. The server does not store it.
Request
Section titled “Request”{ "cmd": "typing", "channel": "general", "duration": 6000}| Field | Type | Required | Description |
|---|---|---|---|
channel |
string | One of channel or thread_id |
Channel name. Must be a text or voice channel. |
thread_id |
string | One of channel or thread_id |
Thread ID. If you also send channel, it must be the thread’s parent. |
duration |
integer | No | How long receivers should show the indicator, in milliseconds. Defaults to 6000. Send 0 to clear it. Must not be negative. |
sent_at |
number | No | Your clock when you sent the request, in Unix seconds. When present, the server adds timing fields to the event. |
Response
Section titled “Response”The server sends the same event to you and to every other connection that can view the channel:
{ "cmd": "typing", "channel": "general", "user": "alice", "duration": 6000}useris the typer’s username.- A thread event has
thread_id, andchannelis the thread’s parent. - If you sent
sent_at, the event also hassent_at,server_received_at, andserver_sent_at, in Unix seconds. - Users severed from you don’t receive it. A moderator can sever two users with the
/severslash command so they no longer see each other. - Only your copy carries your request’s
listener.
The server does not send a “stopped typing” event. Hide the indicator after duration milliseconds, or when a typing event with duration: 0 arrives.
Permissions
Section titled “Permissions”You need permission to send messages in the channel. For a thread, the thread must also be unlocked. A user in a timeout can’t send typing.
Errors
Section titled “Errors”val |
When |
|---|---|
You do not have permission to type in this channel |
The channel or thread doesn’t exist, the channel is a forum or separator, you can’t view or send in it, or the thread is locked. |
A validation message is returned when a field has the wrong type or duration is negative. A user in a timeout gets a rate_limit frame instead; see the protocol model.
