message)) { $message = $update->message ?? ''; $message_id = $message->message_id ?? ''; $text = $message->text ?? ''; $from_id = $message->from->id ?? ''; $chat_id = $message->chat->id ?? ''; $user_name = $message->from->username ?? 'ندارد'; $first_name = htmlspecialchars($message->from->first_name, ENT_QUOTES, 'UTF-8') ?? ''; $last_name = $message->from->last_name ?? ''; $full_name = trim("$first_name $last_name") ?? ''; $phone_number = $message->contact->phone_number ?? 'ثبت نشده'; $photo = $message->photo ?? ''; $photo_id = $photo ? $photo[count($photo) - 1]->file_id : ''; } if (isset($update->callback_query)) { $from_id = $update->callback_query->from->id ?? ''; $chat_id = $update->callback_query->message->chat->id ?? ''; $data = $update->callback_query->data ?? ''; $query_id = $update->callback_query->id ?? ''; $type = $update->callback_query->message->chat->type ?? ''; $message_id = $update->callback_query->message->message_id ?? ''; }