Php 电报机器人无休止地发送消息

Php 电报机器人无休止地发送消息,php,bots,telegram,Php,Bots,Telegram,我的电报机坏了。在其中一个命令的响应中,它不断地发送一条消息。我以前有过这个问题,我用http\u response\u代码(200)解决了它但这一次,这些都没有改善。 这是发送该消息的代码部分: elseif ($textmessage == 'command') $forceReply0 = array( 'force_reply' => true ); $forceReply = json_encode($forceReply0); SendMessage($chat_id,'&

我的电报机坏了。在其中一个命令的响应中,它不断地发送一条消息。我以前有过这个问题,我用
http\u response\u代码(200)解决了它
但这一次,这些都没有改善。 这是发送该消息的代码部分:

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();
}
}
elseif($textmessage=='command')
$forceReply0=数组(
“强制回复”=>正确
);
$forceReply=json_编码($forceReply0);
SendMessage($chat\u id,,$forceReply,$message\u id);
$newPublisherID=$chat\u id;
$GLOBALS['newPublisherID']=$newPublisherID;
试一试{
$connection=newPDO();
$prepared=$connection->prepare();
$prepared->execute($newPublisherID);
}捕获(PDO$e){
//错误文本信息
$errorDetail=$e.getMessage();
}
}

您使用哪种类型的Webhook或GetUpdate?你的命令会发生这种情况吗?我正在使用Webhook。它发生在你第一次向bot发送命令之后。你有缓存引擎或CDN吗?