there is something wrong with my telegram bot. in the respond of one of the commands it keeps sending one message endlessly. I had this problem before and I solved it with http_response_code(200);
but this time it doesn't get better with any of these.
this is the part of code which sends that message:
elseif ($textmessage == 'command')
$forceReply0 = array(
'force_reply' => true
);
$forceReply = json_encode($forceReply0);
SendMessage($chat_id,'<message>',$forceReply,$message_id);
$newPublisherID = $chat_id;
$GLOBALS['newPublisherID'] = $newPublisherID;
try{
$connection=newPDO(<connection detail>);
$prepared = $connection->prepare(<sql query>);
$prepared->execute($newPublisherID);
}catch(PDOException $e){
//error text info
$errorDetail = $e.getMessage();
}
}