Skip to main content

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

NameTypeRequiredDescription
PeerInputPeerClassyesThe peer from which we wish to post stories.

Returns

*StoriesCanSendStoryCount

Possible errors

CodeTypeDescription
400BOOSTS_REQUIREDThe specified channel must first be boosted by its users in order to perform this action.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400PEER_ID_INVALIDThe provided peer id is invalid.
400PREMIUM_ACCOUNT_REQUIREDA premium account is required to execute this action.
400STORIES_TOO_MUCHYou 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