Getting info about chats

There are various methods that can be used to fetch info about chats, based on bot API id, tg-cli ID, Peer, User, Chat objects.

getPwrChat (now fully async!)

$pwr_chat = yield $MadelineProto->getPwrChat(-100214891824);
foreach ($pwr_chat['participants'] as $participant) {
    \danog\MadelineProto\Logger::log($participant);
}

Use getPwrChat to get full chat info, including the full list of members, see here for the parameters and the result.

getFullInfo (now fully async!)

$full_chat = yield $MadelineProto->getFullInfo(-10028941842);

You can also use getFullInfo to get full chat info, without the full list of members, see here for the parameters and the result.

getInfo (now fully async!)

$chat = yield $MadelineProto->getInfo(-10028941842);

You can also use getInfo to get chat info, see here for the parameters and the result

getId (now fully async!)

$id = yield $MadelineProto->getID($update);

You can also use getId to get chat ID from updates, messages and other objects.

Next section

This site uses cookies, as described in the cookie policy. By clicking on "Accept" you consent to the use of cookies.