Layer 220
AccountGetPaidMessagesRevenue
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.
method
Users
account.getPaidMessagesRevenue#19ba4a67 flags:# parent_peer:flags.0?InputPeer user_id:InputUser = account.PaidMessagesRevenue;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| ParentPeer | flags.0?InputPeer | 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 | InputUser | The user that paid to send us messages. |
Returns
account.PaidMessagesRevenuePossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | PARENT_PEER_INVALID | The specified parent_peer is invalid. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
Gogram Example
// AccountGetPaidMessagesRevenue - using Params struct result, err := client.AccountGetPaidMessagesRevenue(&tg.AccountGetPaidMessagesRevenueParams{ UserId: &tg.InputUserSelf{}, // Optional fields: // ParentPeer: &tg.InputPeerUser{UserID: int64(123456789)}, }) if err != nil { // handle error } // result is *tg.AccountPaidMessagesRevenue