'How to send location with whatsapp web js

can you help me to send the location of a place with Whatsapp web js Like I want to send a user who messages me location then the location would be sent of London or any other place. ThankYou Here are the Whatsapp web js docs https://github.com/pedroslopez/whatsapp-web.js



Solution 1:[1]

You just need to create a location and send as message.

const location = new Location(latitude, longitude, description of location);
client.sendMessage(user, location);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 erli pinheiro