danielcardeenas / sulla

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

How to run this project? Sorry still a noob #328

Open afdhalrashid opened 4 years ago

TheCBKM commented 4 years ago

you can start with this then run the code using node

const sulla = require('sulla');

sulla.create().then((client)=>{ client.sendText(<phone number with country code>@c.us, "Hello") .then(d => { console.log(d) }) .catch(e => { console.log(e) }) })

afdhalrashid commented 4 years ago

Thanks @TheCBKM , successfully send the message.

afdhalrashid commented 4 years ago

How to use the async / await code?

lhgrigio commented 4 years ago

How to use the async / await code?

Async is used do declare asynchronous functions, await is used inside async functions.

More information: https://blog.bitsrc.io/understanding-javascript-async-and-await-with-examples-a010b03926ea

TheCBKM commented 4 years ago

async function (){ const client= await sulla.create() await client.sendText(<phone number with country code>@c.us, "Hello") }

EdoWahdana commented 4 years ago

Hey mine is stuck in Authenticating... and didn't print any qrcode. How to start the project properly after i ran npm i sulla?

elianiva commented 4 years ago

Hey mine is stuck in Authenticating... and didn't print any qrcode. How to start the project properly after i ran npm i sulla?

try deleting session folder

TheCBKM commented 4 years ago

Hey mine is stuck in Authenticating... and didn't print any qrcode. How to start the project properly after i ran npm i sulla?

Delete Sessions folder

0xkarambit commented 4 years ago

Hey mine is stuck in Authenticating... and didn't print any qrcode. How to start the project properly after i ran npm i sulla?

Delete Sessions folder

Still stuck

EdoWahdana commented 4 years ago

Deleting session folder didn't work for me,i set the headless config to false and it worked for me.

joedutra commented 4 years ago

the repository is deprecated use

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