im developing telegram bot using codeigniter + PHP to respond to user request, and since this morning, its stop working, and pending_update_count : 210 and increasing ...
my question is how we can clear the pending count ?
what have i try :
1. unset the webhook and set it again => this doesnt work, pending_update_count still hasn't cleared
2. using controller that didnt do anything(look my code below) => this also doesnt work, pending_update_count still hasn't cleared
and this is my code that doesnt do anything
class index extends CI_Controller {
function __construct() {
parent::__construct();
}
public function index() {
echo('halooo');
$result = 'ok';
return $result;
}
}
and this how i usually process the message from telegram bot
class index extends CI_Controller {
function __construct() {
parent::__construct();
}
public function index() {
$content = file_get_contents("php://input");
$update = json_decode($content, true);
$chatID = $update["message"]["from"]["id"];
$strcmd = trim($update["message"]["text"]);
$strMsg = $this->process($strcmd); //process
$sendto =API_URL."sendmessage?chat_id=".$chatID."&sendmessage?text=".$strMsg."";
file_get_contents($sendto);
}
}
i look these question in stackoverflow, but didnt help :
1. Clear "pending_update_count" in Telegram Bot
2. clear pending_update_count in Telegram Bot