getMessage(); $members = $message->getNewChatMembers(); if ($message->botAddedInChat()) { return $this->replyToChat('Hi there, you BOT!'); } $member_names = []; foreach ($members as $member) { $member_names[] = $member->tryMention(); } return $this->replyToChat('Hi ' . implode(', ', $member_names) . '!'); } }