简体   繁体   English

通过 node.js 的 Telegram Bot Live Location

[英]Telegram Bot Live Location via node.js

How Can I send telegram bot live location?如何发送电报机器人实时位置?

I'm using node-telegram-bot-api Module.我正在使用node-telegram-bot-api模块。

Code:代码:
This Code just Send a Location此代码仅发送位置

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

Solved.解决了。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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