尝试编辑消息时出现 Telegram Bot API 错误:“错误请求:未找到消息" [英] Telegram Bot API error when try to edit message: "Bad Request: message not found"

查看:41
本文介绍了尝试编辑消息时出现 Telegram Bot API 错误:“错误请求:未找到消息"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编辑大约 2 小时前发送的 bot 消息并收到此错误,并认为此消息太旧了无法编辑.然后我尝试编辑另一条稍后发送的消息,它成功了.但在此之后,我尝试编辑最近发送的消息之一,但又一次收到此错误.现在看起来请求的结果是随机的.

I've tried to edit bot's message which was sended about 2 hours ago and got this error and supposed that this message so old for editing that it is unable. Then I've tried to edit another message which was sended a little later and it was successful. But after this I've tried to edit one of recently sended messages an got this error one more time. Now it seems like request's results is random.

什么意思?

这是我的 POST 查询示例:

Here an example of my POST query:

https://api.telegram.org/bot{token}/editMessageText?chat_id=12345&message_id=370&text=New text

这里的结果:

{
  "ok": false,
  "error_code": 400,
  "description": "Bad Request: message not found"
}

推荐答案

这是因为您尝试编辑的消息不是由机器人发送的.

我也有这个问题.就我而言,我试图编辑由三位管理员发送的频道上的一些帖子;两个人工管理员和一个机器人.

I had this problem too. In my case I was trying to edit some posts on a channel which were sent by three admins; two human admins and a bot.

机器人只能编辑自己的消息.

The bot can only edit its own messages.

编辑时间限制仅适用于人类用户.

机器人可以随时编辑自己的消息.

bots can edit their own messages anytime.

这篇关于尝试编辑消息时出现 Telegram Bot API 错误:“错误请求:未找到消息"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆