telegram api method · layer 229 · #58943ee2

messages.setTyping

usable by users and bots

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

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

returns

Bool

errors (23)

codeerrordescription
400BUSINESS_CONNECTION_INVALIDThe connection_id passed to the wrapping invokeWithBusinessConnection call is invalid.
400BUSINESS_CONNECTION_NOT_ALLOWEDThis 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.
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.
400CHANNEL_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.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400MESSAGE_TOO_LONGThe provided message is too long.
400MSG_ID_INVALIDInvalid message ID provided.
400PEER_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.
400USER_IS_BLOCKEDYou were blocked by this user.
400USER_IS_BOTBots can't send messages to other bots.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
403GROUPCALL_FORBIDDENThe specified group call cannot be used in this context.
403USER_IS_BLOCKEDYou were blocked by this user.
406CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
406PEER_ID_INVALIDThe provided peer id is invalid.

history

present in layers 2–229 · constructor id changed 2×

idlayers
#719839e92–16
#a3825e5017–118
#58943ee2119–229