Telegram Bot Live Location via node.js(Telegram Bot通过node.js进行现场定位)
问题描述
如何发送电报机器人实时位置?
我正在使用node-telegram-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,
});
});
这篇关于Telegram Bot通过node.js进行现场定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!