Layer 220
StatsGetBroadcastStats
Get channel statistics
method
Users
stats.getBroadcastStats#ab42441a flags:# dark:flags.0?true channel:InputChannel = stats.BroadcastStats;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Dark | flags.0?true | Whether to enable dark theme for graph colors |
| Channel | InputChannel | The channel |
Returns
stats.BroadcastStatsPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BROADCAST_REQUIRED | This method can only be called on a channel, please use stats. get Megagroup Stats 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. |
Gogram Example
// StatsGetBroadcastStats - using Params struct result, err := client.StatsGetBroadcastStats(&tg.StatsGetBroadcastStatsParams{ Channel: &tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, // Optional fields: // Dark: true, }) if err != nil { // handle error } // result is *tg.StatsBroadcastStats