danielcardeenas / sulla

👩🏻‍🔬 Javascript Whatsapp api library for chatbots
MIT License
1.26k stars 274 forks source link

Create chat for whatsapp contact saved in contacts #327

Open FelixWeichselgartner opened 4 years ago

FelixWeichselgartner commented 4 years ago

Hi,

I'm trying to send a whatsapp message to a contact with given chatId that is saved in my phones contacts (and retrievable with getContact or getAllContacts) but without an active chat yet.

So far I tried:

Send message to new contacts (non-added)
Also see Whatsapp links Be careful since this can pretty much could cause a ban from Whatsapp, always keep your contacts updated!

await client.sendMessageToId('5212234234@c.us', 'Hello from sulla! 👋');

but this does not work for me. Also i dont really get the difference between sendText and sendMessageToId as the parameters seem to be the same.

Furthermore I could find a method like create chat or chatId or anything similar.

Does anybody have thoughts on that? Any help is appreciated. TY very much.

joedutra commented 4 years ago

the repository is deprecated use

Install npm i @s2click/venom https://github.com/s2click/venom