Node.js 如何更新消息以在电报中显示场地?

Node.js 如何更新消息以在电报中显示场地?,node.js,telegram,telegram-bot,Node.js,Telegram,Telegram Bot,我有一个电报机器人。我想更新一条消息,以便文本将被场地对象替换。 当我使用“回复至”消息id中的消息id呼叫SendVincement时,telegram会使用该地点创建一条新消息,而不是更新现有消息 我做错了什么 以下是请求: 发送消息: 请求: https://api.telegram.org/bot{{telegram-token}}/sendMessage { "chat_id" : ..., "text" : "my text", } https://api.tel

我有一个电报机器人。我想更新一条消息,以便文本将被场地对象替换。 当我使用“回复至”消息id中的消息id呼叫SendVincement时,telegram会使用该地点创建一条新消息,而不是更新现有消息

我做错了什么

以下是请求:

发送消息:
请求:

https://api.telegram.org/bot{{telegram-token}}/sendMessage
{
    "chat_id" : ..., 
    "text" : "my text",
}
https://api.telegram.org/bot{{telegram-token}}/sendVenue
{
    "chat_id" : "...", 
    "longitude" : -74.8354,
    "latitude": 40.13817,
    "title" : "my title",
    "address" : "my address",
    "disable_notification" : true,
    "reply_to_message_id" : 247
}
答复:

{
    "ok": true,
    "result": {
        "message_id": 247,
        "from": {
            "id": 123456,
            "is_bot": true,
            "first_name": "...",
            "username": "..."
        },
        "chat": {
            "id": ...,
            "title": "...",
            "type": "supergroup"
        },
        "date": 1546552248,
        "text": "my text"
    }
}
将消息更新到场馆:
请求:

https://api.telegram.org/bot{{telegram-token}}/sendMessage
{
    "chat_id" : ..., 
    "text" : "my text",
}
https://api.telegram.org/bot{{telegram-token}}/sendVenue
{
    "chat_id" : "...", 
    "longitude" : -74.8354,
    "latitude": 40.13817,
    "title" : "my title",
    "address" : "my address",
    "disable_notification" : true,
    "reply_to_message_id" : 247
}

电报机器人API不允许机器人将消息从一种类型更新到另一种类型。您可以将文字信息的内容更改为其他文字。但您不能将短信更改为地点

您唯一能做的就是删除旧邮件并发送新邮件

所以你可以这样做:

> Send text message
> Delete it
> Send venue
但是发送和删除短信没有意义