messages.setTyping #

Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.

Layer 223

boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
peerInputPeerTarget user or group
top_msg_idflags.0?intTopic ID
actionSendMessageActionType of action

Result #

Bool

Both users and bots can use this method #

This method can be invoked over a business connection » #

Possible errors #

CodeTypeDescription
400BUSINESS_CONNECTION_INVALIDThe connection_id passed to the wrapping invokeWithBusinessConnection call is invalid.
400BUSINESS_PEER_INVALIDMessages can't be set to the specified peer through the current business connection.
400BUSINESS_PEER_USAGE_MISSINGYou cannot send a message to a user through a business connection if the user hasn't recently contacted us.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_MONOFORUM_UNSUPPORTEDMonoforums do not support this feature.
406CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400CHAT_ID_INVALIDThe provided chat id is invalid.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
403GROUPCALL_FORBIDDENThe specified group call cannot be used in this context.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400MESSAGE_TOO_LONGThe provided message is too long.
400MSG_ID_INVALIDInvalid message ID provided.
406PEER_ID_INVALIDThe provided peer id is invalid.
400TEXTDRAFT_PEER_INVALIDsendMessageTextDraftAction can only be used in private 1-on-1 chats.
400USER_BANNED_IN_CHANNELYou're banned from sending messages in supergroups/channels.
403USER_IS_BLOCKEDYou were blocked by this user.
400USER_IS_BOTBots can't send messages to other bots.

Message threads #

Telegram allows commenting on a channel post or on a generic supergroup message, thanks to message threads.

SendMessageAction #

User actions. Use this to provide users with detailed info about their chat partner's actions: typing or sending attachments of all kinds.

Telegram Business #

Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.

Channels, supergroups, gigagroups and basic groups #

How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.