Google Like assistant in whatsapp.
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.
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!
whatsapp-assistant-bot requires Python v3+ to run.
Install the dependencies and devDependencies:
$ cd whatsapp-assistant-bot
$ pip3 install -r requirements.txt
- Create a whatsapp group or member named
BOT
(all caps) This is a mandatory requirement - Message
Hi
to the group or member. This is a mandatory requirement - Download
chromedriver
from here according to your Chrome Version & Operating System. - 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
- Fire the below commands from the directory
$ cd src $ python3 main.py
- If you don't see any errors, you have successfully ran the script. Go and fire some commands!
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 |
- Whatsapp Attachments Commands
MIT