简体   繁体   中英

Telegram Bot Live Location via node.js

How Can I send telegram bot live location?

I'm using node-telegram-bot-api Module.

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

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