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.
- Full chat info with full list of participants
- Full chat info
- Reduced chat info (very fast)
- Just the chat ID (extremely fast)
getPwrChat
$pwr_chat = $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.
- Completeness: full
- Speed: medium
- Caching: medium
getFullInfo
$full_chat = $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.
- Completeness: medium
- Speed: medium-fast
- Caching: full
getInfo
$chat = $MadelineProto->getInfo(-10028941842);
You can also use getInfo
to get chat info, see here for the parameters and the result
- Completeness: small
- Speed: very fast
- Caching: full
getId
$id = $MadelineProto->getID($update);
You can also use getId
to get chat ID from updates, messages and other objects.
- Speed: very fast
- Caching: full