Skip to main content

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

NameTypeRequiredDescription
DarkboolWhether to enable dark theme for graph colors
ChannelInputChannelClassyesSupergroup ID

Returns

*StatsMegagroupStats

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
403CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400MEGAGROUP_REQUIREDYou can only use this method on a supergroup.

References