telegram api method · layer 229 · #ad0fa15c
messages.saveDraft
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
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
no_webpage | true | Disable generation of the webpage preview |
invert_media | true | If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. |
reply_to | InputReplyTo | If set, indicates that the message should be sent in reply to the specified message or story. |
peer | InputPeer | Destination of the message that should be sent |
message | string | The draft |
entities | Vector<MessageEntity> | Message entities for styled text |
media | InputMedia | Attached media |
effect | long | Specifies a message effect » to use for the message. |
suggested_post | SuggestedPost | Used to suggest a post to a channel, see here » for more info on the full flow. |
rich_message | InputRichMessage |
returns
errors (8)
| code | error | description |
|---|---|---|
| 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 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | ENTITY_BOUNDS_INVALID | A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length. |
| 400 | INPUT_USER_DEACTIVATED | The specified user was deleted. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 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. |
history
present in layers 62–229 · constructor id changed 5×
| id | layers |
|---|---|
| #bc39e14b | 62–147 |
| #b4331e3f | 148–165 |
| #7ff3b806 | 166–181 |
| #d372c5ce | 182–205 |
| #54ae308e | 206–226 |
| #ad0fa15c | 227–229 |