A facebook chatbot built around fbchat library, designed to remember your loved ones to stay hydrated.
To understand what virtual environments are and why you'll want them, see this document.
$ pip install virtualenv # Install virtualenv first
$ cd HYDRABOT_DIRECTORY
$ virtualenv venv # Creates a new virtual environment inside "venv" directory
Windows:
$ source venv/Scripts/activate
Linux/Mac OS:
$ source venv/bin/activate
$ pip install -r requirements.txt
On windows you will need an additional module:
$ pip install windows-curses
Remember to activate your virtual environment if you haven't already.
$ python HYDRABOT_DIRECTORY
- The bot is active during a given timespan and sends groups of messages
- Will choose plain text message, emoji message and/or image based on possible texts, emojis, etc. (Minimum one message type, maximum all three types)
- Randomly chooses amount of message groups to send during given timespan
- Can announce itself by waving first
- Is able to change thread emoji temporarily
- Imitates human behaviour by "typing" before sending and delaying texts
- Modes available:
- demo - Doesn't connect to FB (preview mode)
- test - Ignores times
- Modes can be combined or turned off entirely.
The bot can be configured by modifying the file hydrabot_py/config.py
. As it's very extensive, it will mostly not be explained here, but rather by comments inside the file.
This is optional. By default no image messages will be sent.
In order for random images to work you have to provide required values for Giphy and/or Google Image Search.
Get started:
- Set
image_chance_per_message
config variable to a value above 0. - Optional: Adjust
image_gis_giphy_chance
config variable. (Explained by comment inside config file)
For Giphy:
- Obtain Giphy API key
- Set
giphy_api_key
configuration variable to API key.
For Google Image Search:
- Create a Google Custom Search
- Enable Image Search for it
- Set
gis_api_key
to your API key andgis_project_cx
to your project CX.
- Logo:
- Molot font by Jovanny Lemonad
- Robot emoji by OpenMoji
- Wave icon by Flaticon