Layer 220
DraftMessage
Represents a message draft.
constructor
draftMessage#96eaa5eb flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia date:int effect:flags.7?long suggested_post:flags.8?SuggestedPost = DraftMessage;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| NoWebpage | flags.1?true | Whether no webpage preview will be generated |
| InvertMedia | flags.6?true | If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. |
| ReplyTo | flags.4?InputReplyTo | If set, indicates that the message should be sent in reply to the specified message or story. |
| Message | string | The draft |
| Entities | Vector<MessageEntity> | Message entities for styled text. |
| Media | flags.5?InputMedia | Media. |
| Date | int | Date of last update of the draft. |
| Effect | flags.7?long | A message effect that should be played as specified here. |
| SuggestedPost | flags.8?SuggestedPost | Used to suggest a post to a channel, see here for more info on the full flow. |
Returns
DraftMessageGogram Example
// Creating DraftMessage constructor obj := &tg.DraftMessage{ Message: "...", Date: 0, // Optional fields: // NoWebpage: true, // InvertMedia: true, // ReplyTo: &tg.InputReplyToMessage{ReplyToMsgID: 123}, // Entities: []tg.MessageEntity{&tg.MessageEntityBold{Offset: 0, Length: 4}}, // ... more optional fields }