stories.editStory
Edit an uploaded story May also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the ID of a controlled business user in peer: in this context, the method can only be used to edit stories posted by the same business bot on behalf of the user with stories.sendStory.
func (c *Client) StoriesEditStory(ctx context.Context, request *StoriesEditStoryRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StoriesEditStory(ctx, &tg.StoriesEditStoryRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | Peer where the story was posted. |
ID | int | yes | ID of story to edit. |
Media | InputMediaClass | — | If specified, replaces the story media. |
MediaAreas | []MediaAreaClass | — | Media areas associated to the story, see here » for more info. |
Caption | string | — | If specified, replaces the story caption. |
Entities | []MessageEntityClass | — | Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter ». |
PrivacyRules | []InputPrivacyRuleClass | — | If specified, alters the privacy settings » of the story, changing who can or can't view the story. |
Music | InputDocumentClass | — | Music field of StoriesEditStoryRequest. |
Returns
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. |
References
- Official documentation
- Generated Go reference
- TL definition:
stories.editStory#2c63a72b