Method: stats.getBroadcastStats
Back to methods index
Get channel statistics
Parameters:
Can bots use this method: NO
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();
$stats.BroadcastStats = $MadelineProto->stats->getBroadcastStats(['dark' => Bool, 'channel' => InputChannel, ]);
Or, if you're into Lua:
stats.BroadcastStats = stats.getBroadcastStats({dark=Bool, channel=InputChannel, })
Errors
Code |
Type |
Description |
400 |
CHANNEL_INVALID |
The provided channel is invalid |
400 |
CHANNEL_PRIVATE |
You haven't joined this channel/supergroup |
400 |
CHAT_ADMIN_REQUIRED |
You must be an admin in this chat to do this |
-503 |
Timeout |
Timeout while fetching data |