简体   繁体   中英

ETELEGRAM: 400 Bad Request: there is no live location in the message to edit

I Want to Send My Live Location to telegram bot users, Bot I got This Error:

ETELEGRAM: 400 Bad Request: there is no live location in the message to edit

How Should I Solve?

Module: ( https://github.com/yagop/node-telegram-bot-api )

Code:

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
            }
        });

    }
});

You need to send live location first.

Use sendLocation method with live_period , just like the following instance:

很棒的电报机器人

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM