account.getPaidMessagesRevenue
Get the number of stars we have received from the specified user thanks to paid messages »; the received amount will be equal to the sent amount multiplied by stars_paid_message_commission_permille divided by 1000.
func (c *Client) AccountGetPaidMessagesRevenue(ctx context.Context, request *AccountGetPaidMessagesRevenueRequest) (*AccountPaidMessagesRevenue, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountGetPaidMessagesRevenue(ctx, &tg.AccountGetPaidMessagesRevenueRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *AccountPaidMessagesRevenue
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ParentPeer | InputPeerClass | — | If set, can contain the ID of a monoforum (channel direct messages) to obtain the number of stars the user has spent to send us direct messages via the channel. |
UserID | InputUserClass | yes | The user that paid to send us messages. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PARENT_PEER_INVALID | The specified parent_peer is invalid. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.getPaidMessagesRevenue#19ba4a67