Skip to main content

stats.getMessageStats

Get message statistics

func (c *Client) StatsGetMessageStats(ctx context.Context, request *StatsGetMessageStatsRequest) (*StatsMessageStats, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.StatsGetMessageStats(ctx, &tg.StatsGetMessageStatsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StatsMessageStats
return nil
})

Parameters

NameTypeRequiredDescription
DarkboolWhether to enable dark theme for graph colors
ChannelInputChannelClassyesChannel ID
MsgIDintyesMessage ID

Returns

*StatsMessageStats

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.

References