vasani-arpit / WBOT

A simple Web based BOT for WhatsApp™ in NodeJS 😜. Working as of 📅 Feb 4th, 2024
Other
987 stars 314 forks source link

Sendmsg and sendmessagetoID #294

Closed tradename closed 2 years ago

tradename commented 2 years ago

Function's sendmessage('Number@c.us','my message's) and sendmessagetoID seem not to be sending to contacts that have not been recently contacted. It's also not sending to contacts saved in phone .

vasani-arpit commented 2 years ago

have you tried sendMessage2 function? It might work !!

tradename commented 2 years ago

sendmessage2 won't work again,

error message

/snapshot/master/src/WAPI.js:307 Uncaught TypeError: Cannot read property 'sendMessage' of undefined at Object.window.WAPI.getChat (/snapshot/master/src/WAPI.js:307) at Object.window.WAPI.sendMessage2 (/snapshot/master/src/WAPI.js:829) at :1:6

vasani-arpit commented 2 years ago

have a look at inject.js https://github.com/vasani-arpit/WBOT/blob/master/src/inject.js#L212 sendMessage2 is being used in all places there. If your bot responds then sendMessage2 is working.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.