Open ak-umka opened 1 year ago
If an Android user sends a message to him and the user clicks on the send location button, he automatically responds to the message from the bot. If the user has IOS, then he does not respond to the bot's message, but simply sends the location
i have this code: index.js
const area = await bot.sendMessage(msg.chat.id, "address", locationButton()); bot.onReplyToMessage(msg.chat.id, area.message_id, async (nameMsg) => { console.log(nameMsg, 'nameMsgLOCATION'); const location = nameMsg.location; const name = nameUser[msg.from.id]; const areaObj = await AreaService.createArea(name, location, msg.from.username); await bot.sendMessage(msg.chat.id, `save`, { parse_mode: "HTML" }); });
helper.js
exposrt const locationButton = () => { return { reply_markup: JSON.stringify({ keyboard: [ [{ text: "send location", request_location: true }], ], resize_keyboard: true, one_time_keyboard: true, }), } };
i tried through bot.on() but this but this method did not work for me
If an Android user sends a message to him and the user clicks on the send location button, he automatically responds to the message from the bot. If the user has IOS, then he does not respond to the bot's message, but simply sends the location
i have this code: index.js
helper.js
i tried through bot.on() but this but this method did not work for me