telegram api method · layer 229 · #58943ee2
messages.setTyping
Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.
definition
messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool;
parameters
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
peer | InputPeer | Target user or group |
top_msg_id | int | Topic ID |
action | SendMessageAction | Type of action |
returns
errors (23)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_INVALID | The connection_id passed to the wrapping invokeWithBusinessConnection call is invalid. |
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 400 | BUSINESS_PEER_INVALID | Messages can't be set to the specified peer through the current business connection. |
| 400 | BUSINESS_PEER_USAGE_MISSING | You cannot send a message to a user through a business connection if the user hasn't recently contacted us. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_MONOFORUM_UNSUPPORTED | Monoforums do not support this feature. |
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | CHAT_ID_INVALID | The provided chat id is invalid. |
| 400 | INPUT_USER_DEACTIVATED | The specified user was deleted. |
| 400 | MESSAGE_TOO_LONG | The provided message is too long. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | TEXTDRAFT_PEER_INVALID | sendMessageTextDraftAction can only be used in private 1-on-1 chats. |
| 400 | USER_BANNED_IN_CHANNEL | You're banned from sending messages in supergroups/channels. |
| 400 | USER_IS_BLOCKED | You were blocked by this user. |
| 400 | USER_IS_BOT | Bots can't send messages to other bots. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
| 403 | CHAT_WRITE_FORBIDDEN | You can't write in this chat. |
| 403 | GROUPCALL_FORBIDDEN | The specified group call cannot be used in this context. |
| 403 | USER_IS_BLOCKED | You were blocked by this user. |
| 406 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 406 | PEER_ID_INVALID | The provided peer id is invalid. |
history
present in layers 2–229 · constructor id changed 2×
| id | layers |
|---|---|
| #719839e9 | 2–16 |
| #a3825e50 | 17–118 |
| #58943ee2 | 119–229 |