stats.getMegagroupStats
Get supergroup statistics
func (c *Client) StatsGetMegagroupStats(ctx context.Context, request *StatsGetMegagroupStatsRequest) (*StatsMegagroupStats, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StatsGetMegagroupStats(ctx, &tg.StatsGetMegagroupStatsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StatsMegagroupStats
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Dark | bool | — | Whether to enable dark theme for graph colors |
Channel | InputChannelClass | yes | Supergroup ID |
Returns
Possible 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. |
References
- Official documentation
- Generated Go reference
- TL definition:
stats.getMegagroupStats#dcdf8607