내 .php 파일에서이 코드를 만들었습니다. 여기서 작동하는 webHook을 설정했습니다.전보 봇 스위치 업데이트()
$token = "my token";
$website = "https://api.telegram.org/bot" . $token . "/";
$updates = file_get_contents("php://input");
$updates = json_decode($updates, true);
$text = $updates["message"]["text"];
$chatID = $updates["message"]["chat"]["id"];
switch($text){
case "/prova_gratuita":
if(check($chatID)){
sendMessage($chatID, "Are you sure? Demo is available only one time. Write confirm to continue");
switch($text){
case "confirm":
...
break;
}
}
두 번째 switch()
이 작동하지 않습니다. 왜? 내가 무엇을 할 수 있을지? 나는 $text
의 값을 업데이트해야한다는 것을 알고 있지만 어떻게 할 수 있는지 모르겠다.
왜 작동해야합니까? –
죄송합니다. 질문을 완료하지 못했습니다. @u_mulder – Riccardo