ETELEGRAM:400 Bad Request:要编辑的消息中没有实时位置

问题描述 投票:0回答:1

我想发送我的实时位置给电报机器人用户,Bot我得到了这个错误:

ETELEGRAM:400 Bad Request:要编辑的消息中没有实时位置

我该怎么解决?

模块:(https://github.com/yagop/node-telegram-bot-api

码:

bot.on('callback_query', msg => {
    if (msg.data == `ourlivelocation`) {
        bot.editMessageLiveLocation(32.2624884, 53.4246188, {
            parse_mode: 'Markdown',
            message_id: msg.message.message_id,
            chat_id: msg.message.chat.id,
            reply_markup: {
                inline_keyboard: livelocationKeyboard
            }
        });

    }
});
javascript telegram-bot
1个回答
1
投票

您需要先发送实时位置。

使用sendLocation方法与live_period,就像下面的例子:

Awesome Telegram Bot

© www.soinside.com 2019 - 2024. All rights reserved.