Javascript 通过node.js向机器人发送实时位置电报

Javascript 通过node.js向机器人发送实时位置电报,javascript,node.js,telegram-bot,node-telegram-bot-api,Javascript,Node.js,Telegram Bot,Node Telegram Bot Api,如何在现场位置发送电报? 我正在使用节点电报bot api模块 代码: 此代码只发送一个位置 await bot.sendLocation(msg.chat.id, 35.804819, 51.434070); 解决了 bot.onText(/\/livelocation/, async msg => { await bot.sendLocation(msg.chat.id, 35.804819, 51.434070, { live_period: 86

如何在现场位置发送电报?

我正在使用
节点电报bot api
模块

代码:
此代码只发送一个位置

    await bot.sendLocation(msg.chat.id, 35.804819, 51.434070);
解决了

bot.onText(/\/livelocation/, async  msg => {
    await bot.sendLocation(msg.chat.id, 35.804819, 51.434070, {
        live_period: 86400,
    });
});