MadelineProtoDocs/docs/API_docs/methods/channels.getParticipants.md
2024-08-16 15:40:04 +02:00

1.8 KiB

title description grand_parent parent image redirect_from
channels.getParticipants Get the participants of a [supergroup/channel](https://core.telegram.org/api/channel) Telegram RPC API Methods https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png /API_docs/methods/channels_getParticipants.html

Method: channels.getParticipants

Back to methods index

Get the participants of a supergroup/channel

Parameters:

Name Type Description Required
channel Username, chat ID, Update, Message or InputChannel Channel Optional
filter ChannelParticipantsFilter Which participant types to fetch Yes
offset int Offset Optional
limit int Limit Optional
hash Array of [long|string](/API_docs/types/long string.html) Hash

Return type: channels.ChannelParticipants

Can bots use this method: YES

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();

$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(channel: $InputChannel, filter: $ChannelParticipantsFilter, offset: $int, limit: $int, hash: [$long|string, $long|string], );