Layer 220
StatsGetMegagroupStats
Get supergroup statistics
method
Users
stats.getMegagroupStats#dcdf8607 flags:# dark:flags.0?true channel:InputChannel = stats.MegagroupStats;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Dark | flags.0?true | Whether to enable dark theme for graph colors |
| Channel | InputChannel | Supergroup ID |
Returns
stats.MegagroupStatsPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 403 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | MEGAGROUP_REQUIRED | You can only use this method on a supergroup. |
Gogram Example
// StatsGetMegagroupStats - using Params struct result, err := client.StatsGetMegagroupStats(&tg.StatsGetMegagroupStatsParams{ Channel: &tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, // Optional fields: // Dark: true, }) if err != nil { // handle error } // result is *tg.StatsMegagroupStats