我想清除我的機器人中的所有pending_update_count
!清除Telegram Bot中的「pending_update_count」
以下命令的輸出:
https://api.telegram.org/botxxxxxxxxxxxxxxxx/getWebhookInfo
很顯然,我替換XXX真正的API令牌
是這樣的:
{
"ok":true,"result":
{
"url":"",
"has_custom_certificate":false,
"pending_update_count":5154
}
}
正如你所看到的,我有5154
未讀更新直到現在! (我很確定這個未決的更新是錯誤的!因爲沒有人使用這個機器人!它只是一個測試機器人)
順便說一句,這pending_update_count
號碼增加得這麼快! 現在我寫這篇文章的人數增加了51
,達到了5205!
我只是想清除此掛起的更新。 我很確定這個殭屍已經陷入了無限循環!
有什麼辦法擺脫它嗎?
P.S:
我也清除了webhook網址。但沒有任何改變!
UPDATE:
的getWebhookInfo
輸出是這樣的:
{
"ok":true,
"result":{
"url":"https://somewhere.com/telegram/webhook",
"has_custom_certificate":false,
"pending_update_count":23,
"last_error_date":1482910173,
"last_error_message":"Wrong response from the webhook: 500 Internal Server Error",
"max_connections":40
}
}
爲什麼我得到Wrong response from the webhook: 500 Internal Server Error
?
是你的機器人**呼應**消息?這是我能想到的唯一原因 –
什麼阻止你得到這個更新和清除計數器? – anatol
請參閱更新 –