Skip to main content

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

NameTypeRequiredDescription
PeerInputPeerClassyesPeer where the story was posted.
IDintyesID of story to edit.
MediaInputMediaClassIf specified, replaces the story media.
MediaAreas[]MediaAreaClassMedia areas associated to the story, see here » for more info.
CaptionstringIf specified, replaces the story caption.
Entities[]MessageEntityClassMessage entities for styled text in the caption, if allowed by the stories_entities client configuration parameter ».
PrivacyRules[]InputPrivacyRuleClassIf specified, alters the privacy settings » of the story, changing who can or can't view the story.
MusicInputDocumentClassMusic field of StoriesEditStoryRequest.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.
400STORY_NOT_MODIFIEDThe new story information you passed is equal to the previous story information, thus it wasn't modified.

References