mimamch / wa-multi-session

Multiple Session Whatsapp Socket Javascript Library
https://www.npmjs.com/package/wa-multi-session
MIT License
135 stars 42 forks source link

Send Location ? Why Not #4

Open kelasweekend opened 1 year ago

kelasweekend commented 1 year ago

Hey this is not about the issue on this repository just sharing the information, I see and understand the workflow of this package, I understand that this is a combination of the previous package, namely bailyes whatsapp whose repository is currently closed, but it can still run except button templates and list templates, I use this repository for my project and I costum with the concept of using bailyes, I read the previous issue can I send a button, location or so on ? I tried the technique below. please try to make sure again, I hope there is a latest update for something like this

================================================= const id = '62819xxxx@s.whatsapp.net' const session = whatsapp.getSession(sessionId) session.sendMessage( id, { location: { degreesLatitude: 24.121231, degreesLongitude: 55.1121221 } } )

=================================================

Best Regards Ojan Alpha

fpiekarski commented 7 months ago

to send location, you need to change this file .\node_modules\wa-multi-session\dist\Messaging\index.js index.js.txt remember to remove the .txt extension before, and use method like this: const h = await whatsapp.sendTextMessage({sessionId: "new",to: id, location: { degreesLatitude: 24.121231, degreesLongitude: 55.1121221 } } )