telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

getNewChatMembers() return arrays

Open lyoha opened this issue 3 years ago • 1 comments

Laravel 8.74 exileed/telegram-bot-api 0.2.2

$update = Telegram::getWebhookUpdate();
$message = $update->getMessage();
$users = $message->getNewChatMembers();

$arId = [];
foreach ($users as $user) {
    if ($user->getIsBot()) { // Error: $user is array
        $arId[] = $user->getId();
    }
}

lyoha avatar Dec 01 '21 17:12 lyoha

What does getNewChatMembers method return?

Taalaybek avatar Dec 13 '21 10:12 Taalaybek