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

Merge upstream #246

Closed adam-burns closed 3 years ago

adam-burns commented 3 years ago

upstream v15.1 to v.19

vasani-arpit commented 3 years ago

this is huge. ๐Ÿ‘

adam-burns commented 3 years ago

thank you for this project. i've learnt a little about how it is possible to use js code interception running in a browser and that has been a lot of fun.

i've closed the merge request as i did not mean to merge request bad code upstream to your great project.

i made an error when looking at trying to upgrade my fork, where i hacked together simple and brutally badly coded additional WA quiz facilities to complement a covid awareness radio drama in Uganda.

my intention was to merge and update your code into my forked repo as the last merge i performed was at v0.15.1 into my repository and that code seems to be no longer working with WA.

i'm not an experienced javascript programmer (first attempt is forking this project) and learnt only what i needed as i went.

also evidently not an expert in git merging, thus the mistake ;)

but until recently, for all its flaws, it was a (mostly) running weekly quiz system and keeping tally of engagement scores.

in order to report scores back to participants it also has a hacked together variable set that allows numbers of correct / incorrect answers to be reported once a quiz was finished, etc.

i see you have now a added variable substitution added that seems far more elegant than this.

your forked code with my nasty hacks has been supporting this non-profit program for 40 weeks so far, but i'm not sure i've the skills to quickly salvage functionality with WA from where i am to support getting the bot back up and running for the rest of the radio drama production program.

BTW, i do not expect it of course, but any advice on or help with the best/easiest way to get the quiz up and running again is greatly appreciated.

best wishes, adam

vasani-arpit commented 3 years ago

Thanks, Good to hear that WBOT is helpful for you and organization.

There are libraries in node which can take care of this entire use case for you. https://botkit.ai/ give it a try. do the hello world examples first then you can jump into complex conversations. This can take care of your entire quiz and it also stores user's answers so if user goes away for a while and when he comes back, he can pickup where he left in the quiz/conversation. You can also connect other channels like FB messenger and Web.

All the best ๐Ÿ‘