Method: 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.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
parent_peer | Username, chat ID, Update, Message or 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. | Optional |
user_id | Username, chat ID, Update, Message or InputUser | The user that paid to send us messages. | Optional |
Return type: account.PaidMessagesRevenue
Can users use this method: YES
Can bots use this method: NO
Can bots use this method over a business connection with the businessConnectionId
flag: NO
MadelineProto Example (now async for huge speed and parallelism!):
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$account_PaidMessagesRevenue = $MadelineProto->account->getPaidMessagesRevenue(parent_peer: $InputPeer, user_id: $InputUser, );