Skip to main content

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

NameTypeRequiredDescription
DarkboolWhether to enable dark theme for graph colors
ChannelInputChannelClassyesThe channel

Returns

*StatsBroadcastStats

Possible errors

CodeTypeDescription
400BROADCAST_REQUIREDThis method can only be called on a channel, please use stats.getMegagroupStats for supergroups.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
403CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.

References