stories.canSendStory
Check whether we can post stories as the specified peer.
func (c *Client) StoriesCanSendStory(ctx context.Context, peer InputPeerClass) (*StoriesCanSendStoryCount, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StoriesCanSendStory(ctx, peer)
if err != nil {
return err
}
_ = res // *StoriesCanSendStoryCount
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The peer from which we wish to post stories. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BOOSTS_REQUIRED | The specified channel must first be boosted by its users in order to perform this action. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | PREMIUM_ACCOUNT_REQUIRED | A premium account is required to execute this action. |
| 400 | STORIES_TOO_MUCH | You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire. |
References
- Official documentation
- Generated Go reference
- TL definition:
stories.canSendStory#30eb63f0