stories.togglePinnedToTop
Pin some stories to the top of the profile, see here » for more info.
func (c *Client) StoriesTogglePinnedToTop(ctx context.Context, request *StoriesTogglePinnedToTopRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StoriesTogglePinnedToTop(ctx, &tg.StoriesTogglePinnedToTopRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | Peer where to pin stories. |
ID | []int | yes | IDs of the stories to pin (max stories_pinned_to_top_count_max). |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | STORY_ID_INVALID | The specified story ID is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
stories.togglePinnedToTop#b297e9b