Telegram Bot通过node.js进行现场定位现场、Bot、Telegram、js

2023-09-03 09:55:42 作者:11.你桃不掉啦

如何发送电报机器人实时位置?

我正在使用node-telegram-bot-api模块。

Node.js开发者们都在做什么 Node基金会成员权威调查

编码: 此代码仅发送一个位置

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