PESU Academy WhatsApp Bot for the PESsants and PESts of PES University
You can add the bot using this link. Once the bot has join, please send subscribe
to subscribe to notifications.
You can also send unsubscribe
to unsubscribe yourself from notifications.
- It periodically fetches PESU announcements and notifies you immediately. With a refresh interval of 1 minute, it proves to be faster than the PESU Academy website!
- It updates you about Instagram posts made by clubs
- It follows the r/PESU subreddit
-
The bot uses the Twilio WhatsApp API. Sign up on Twilio WhatsApp to obtain a phone number, a join code and your client credentials
-
After setting up the API, you need to set the redirect URL for when a message is sent to the bot to a route on the Flask app. This can be done on the Twilio console. Set it to
host_name:port_number/recieve
-
Clone the repository
git clone git@github.com:aditeyabaral/pesu-whatsapp-bot.git
- Create a separate virtual environment and install the dependencies. You can use virtualenv -- simple to setup and use.
cd pesu-whatsapp-bot
virtualenv bot
source bot/bin/activate
pip3 install -r requirements.txt
- Setup an
.env
file with the following variables
TWILIO_ACCOUNT_SID=""
TWILIO_AUTH_TOKEN=""
TWILIO_NUMBER=""
TWILIO_JOIN_CODE=""
APP_TOKEN=""
HOST_NAME=""
PORT=""
DATABASE_URL=""
PESU_ACADEMY_SRN=""
PESU_ACADEMY_PASSWORD=""
REDDIT_SECRET_TOKEN=""
REDDIT_PERSONAL_USE_TOKEN=""
REDDIT_USER_AGENT=""
- Run the bot using the following command
python3 app/app.py
We are not looking for new contributions at the moment, since it would defeat the purpose of having a quick and easy way to get the announcements.
However, feel free to open an issue if you have any suggestions.
Contact any of us for any support.