ameybh / ww-wra-goog

Whatsapp bot to search Wolframalpha and Google.
ISC License
3 stars 1 forks source link

Error coming in npm start #1

Closed KrishFX1 closed 3 years ago

KrishFX1 commented 3 years ago

Hi , sorry for disturbing again😅. This time I used this package and ran npm install and then npm start but getting these errors

image

KrishFX1 commented 3 years ago

Also this doesn't work

image

KrishFX1 commented 3 years ago

I haven't installed GIT in my pc yet...I thought its neccesary for this to work so I downloaded but I am not getting what to do

KrishFX1 commented 3 years ago

I have everything , and no error came , till Step 4 But even after installing git step 5 is not working

image

Step 5 error

image

And I think since its failing that's why step6 is also not working (maybe) . . . . . The previous package was working without these steps....Do I really need to use heroku and Git

KrishFX1 commented 3 years ago

image

As you can see I turned few of the lines into comments that I thought are about session storage....And then QR was succesfully showing but when i scanned , it gave an error....which is coming , most probably, due to the lines that I made into comments

Please help with it

ameybh commented 3 years ago

Hello @KrishnaBros2, there a bit of problem in the code. You need to create an .env file with the Wolfram alpha APP ID and set WW_SESSION={}. Once that is done, run the app again. You should see a QR to authenticate. After successfully scanning the QR, a session string object should be printed in terminal like {WA ... }. Make sure to copy it exactly and set it to WW_SESSION in .env. Try restarting the app and now it should start without authentication.

I'll update the code in some time but you can try this until then.

KrishFX1 commented 3 years ago

But I am not getting a WA Session

ameybh commented 3 years ago

I'll update the code in sometime.

KrishFX1 commented 3 years ago

I added a new line of code where i will get result from this api---> https://www.boredapi.com/api/activity --- whenever someone writes !boared ...I am getting the message in the console....But It is not replying and giving this error

image

And i have made some changes in the ww-wra package of urs....this one is ww-wra-goog.....Since that one was wroking so I decided to make changes to it but this one is also giving the same errors

ameybh commented 3 years ago

Hello @KrishnaBros2, I took a look at your code which I believe is at https://github.com/KrishnaBros2/WA-Bot./blob/main/index.js. You have not required the https module like: https://github.com/ameybhavsar24/ww-wra-goog/blob/3cf9857561c9c6cfc5e8a253424e224a12094e5b/index.js#L4

KrishFX1 commented 3 years ago

In WA BOT 2 on my GitHub , I added this line but still not working

KrishFX1 commented 3 years ago

Edit : Yaa I saw it...I didn't add that.

Sorry for that. Let me correct it

KrishFX1 commented 3 years ago

OH MY GOD!! It's working now

Thanks A Lot