Layer 220
StoriesEditStory
Edit an uploaded story
method
Users
Bots
Business
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Peer | InputPeer | Peer where the story was posted. |
| Id | int | ID of story to edit. |
| Media | flags.0?InputMedia | If specified, replaces the story media. |
| MediaAreas | Vector<MediaArea> | Media areas associated to the story, see here for more info. |
| Caption | flags.1?string | If specified, replaces the story caption. |
| Entities | Vector<MessageEntity> | Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter. |
| PrivacyRules | Vector<InputPrivacyRule> | If specified, alters the privacy settings of the story, changing who can or can't view the story. |
Returns
UpdatesPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | STORY_NOT_MODIFIED | The new story information you passed is equal to the previous story information, thus it wasn't modified. |
Gogram Example
// StoriesEditStory - using Params struct result, err := client.StoriesEditStory(&tg.StoriesEditStoryParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, Id: 0, // Optional fields: // Media: &tg.InputMediaPhoto{ID: &tg.InputPhoto{ID: int64(0), AccessHash: int64(0), FileReference: []byte{}}}, // MediaAreas: []tg.MediaArea{&tg.MediaArea{}}, // Caption: "...", // Entities: []tg.MessageEntity{&tg.MessageEntityBold{Offset: 0, Length: 4}}, // ... }) if err != nil { // handle error } // result is *tg.Updates