Skip to content

o-x-y-g-e-n/whatsapp-assistant-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whatsapp-assistant-bot

Maintenance GitHub license GitHub contributors PRs Welcome Open Source? Yes!

Google Like assistant in whatsapp. Image

This is an utility to setup and run an Whatsapp Bot across web and mobile Whatsapp application. The bot listens to some predefined commands and responds to them according the query fired.

Tech

whatsapp-assistant-bot uses a number of open source projects to work properly:

  • Python - Python is a programming language that lets you work quickly and integrate systems more effectively.
  • Selenium - Selenium automates browsers. That's it!

Installation

whatsapp-assistant-bot requires Python v3+ to run.

Install the dependencies and devDependencies:

$ cd whatsapp-assistant-bot
$ pip3 install -r requirements.txt 

Execution

  1. Create a whatsapp group or member named BOT (all caps) This is a mandatory requirement
  2. Message Hi to the group or member. This is a mandatory requirement
  3. Download chromedriver from here according to your Chrome Version & Operating System.
  4. Setup the absolute path of the driver in config.ini file using your favourite text editor. Something like this.
    [selenium]
    chromePath = /home/shivam/Desktop/chromedriver
    
  5. Fire the below commands from the directory
    $ cd src
    $ python3 main.py
  6. If you don't see any errors, you have successfully ran the script. Go and fire some commands!

Commands Available

Command Description Parameters Execution Time Examples
/quote It fetches a random quote from the datasets/quote.xml file - 1-2sec /quote
/fact It fetches a random fact from the datasets/fact.xml file. - 1-2sec /fact
/joke It fetches a random joke from the datasets/joke.xml file. - 1-2sec /joke
/flirt It fetches a random pick-up line from the datasets/flirt.xml file. - 1-2 sec /flirt
/weather It fetches the weather of the specified city,state or country. [country, state, city] 2-5 sec /weather china, /weather newyork
/youtube it fetches the youtube url for the specific term [search_term] 10-15sec /youtube how to make pasta
/news it grabs news [local, technology, world, entertainment, health, sports, business] 5-10 sec /news local, /news business
/calc it performs mathematical functions [argument] 2-5 sec /calc 2^5, /calc 2+5
/lyrics It fetches the lyric of the song [name of the song] 10-15 sec /lyrics havana
/define it fetches the defination of the term [word] 2-5 sec /define amazing
/time it gives you the current date and day - 1 sec /time

Future Improvements

  • Whatsapp Attachments Commands

Demo

Video

License

MIT

ForTheBadge built-with-love

About

Google Like assistant in whatsapp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages