Layer 224
StoriesEditStory
Edit an uploaded story
method
Users
Bots
Business
Parameters
| Name | Type | Description |
|---|---|---|
| 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
UpdatesGogram Example
// StoriesEditStory - using Params struct result, err := client.StoriesEditStory(&tg.StoriesEditStoryParams{ Peer: &tg.InputPeerUser{UserID: int64(777000)}, Id: 42, // Optional fields: // Media: &tg.InputMediaPhoto{ID: &tg.InputPhoto{ID: int64(5678901234567890), AccessHash: int64(1234567890123456), FileReference: []byte{0x01}}}, // MediaAreas: []tg.MediaArea{&tg.MediaArea{}}, // Caption: "Hello, World!", // Entities: []tg.MessageEntity{&tg.MessageEntityBold{Offset: 0, Length: 11}}, // ... }) if err != nil { // handle error } // result is *tg.Updates
Possible 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. |