telegram api method · layer 229 · #ad0fa15c

messages.saveDraft

usable by users

Save a message draft associated to a chat.

definition

messages.saveDraft#ad0fa15c flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia effect:flags.7?long suggested_post:flags.8?SuggestedPost rich_message:flags.9?InputRichMessage = Bool;

parameters

nametypedescription
flags#Flags, see TL conditional fields
no_webpageflags.1?trueDisable generation of the webpage preview
invert_mediaflags.6?trueIf set, any eventual webpage preview will be shown on top of the message instead of at the bottom.
reply_toflags.4?InputReplyToIf set, indicates that the message should be sent in reply to the specified message or story.
peerInputPeerDestination of the message that should be sent
messagestringThe draft
entitiesflags.3?Vector<MessageEntity>Message entities for styled text
mediaflags.5?InputMediaAttached media
effectflags.7?longSpecifies a message effect » to use for the message.
suggested_postflags.8?SuggestedPostUsed to suggest a post to a channel, see here » for more info on the full flow.
rich_messageflags.9?InputRichMessage

returns

Bool

errors (8)

codeerrordescription
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.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400ENTITY_BOUNDS_INVALIDA specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400MSG_ID_INVALIDInvalid message ID provided.
400PEER_ID_INVALIDThe provided peer id is invalid.
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.

history

present in layers 62–229 · constructor id changed 5×

idlayers
#bc39e14b62–147
#b4331e3f148–165
#7ff3b806166–181
#d372c5ce182–205
#54ae308e206–226
#ad0fa15c227–229