Api
Api copied to clipboard
Как отличить
//Handle text messages
$bot->on(function (\TelegramBot\Api\Types\Update $update) use ($bot) {
$message = $update->getMessage();
$id = $message->getChat()->getId();
...
});
как понять откуда пришло сообщение? в личке или в группе?
Проверяй по ChatId, а юзера по UserId