stats.getBroadcastStats
Get channel statistics
func (c *Client) StatsGetBroadcastStats(ctx context.Context, request *StatsGetBroadcastStatsRequest) (*StatsBroadcastStats, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StatsGetBroadcastStats(ctx, &tg.StatsGetBroadcastStatsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StatsBroadcastStats
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Dark | bool | — | Whether to enable dark theme for graph colors |
Channel | InputChannelClass | yes | The channel |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BROADCAST_REQUIRED | This method can only be called on a channel, please use stats.getMegagroupStats for supergroups. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 403 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
References
- Official documentation
- Generated Go reference
- TL definition:
stats.getBroadcastStats#ab42441a