An AI mood-tracking Discord bot powered by
DataStax Astra's Apache Cassandra Databases | Linode Cloud | Google Cloud
Domain.com | IBM Watson Tone Analyzer
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Pip is a Discord bot that aims to improve mental health through a multitude of functions. By combining IBM Watson’s tone analyzer and Google Cloud’s natural language processing sentiment, Pip can analyze messages and accurately determine the user's mood. Using the mood detected, Pip then responds accordingly, providing the user with support in the form of an uplifting message and the appropriate resources to help with how they are feeling. The user can also view their moods for the last 7 days in an easy-to-view graphic, which will help them identify things in their life that affect their mental well-being and make adjustments.
Alongside the mood tracking feature, Pip also offers a variety of other mental health services. Every 24 hours, Pip will send a message to give the user a mood boost and remind them to log their emotions. In case they feel down, Pip also has a motivation command that will automatically retrieve a motivational post from a never-ending list of options hand-curated by thousands of users. Finally, Pip can provide mental health resources on command if the user needs some more targeted resources.
- DataStax Astra Database
- Hosted on Linode
- Google Cloud Translation/Natural Language Apis
- IBM Watson Tone Analyzer
To get a local copy up and running, follow these simple steps.
This is an example of how to list things you need to use the software and how to install them.
- Python
3.9,pip3
-
Update before installing new packages
sudo apt-get update
-
Check Python version
python3 --version
-
If Python version <
3.9sudo apt install python3.9
-
Validate
python3.9 --version
-
Install
pip3sudo apt-get -y install python3-pip
-
Validate
pip3 --version
-
Clone the repo
git clone https://github.com/Ti1mmy/CheckinWithme.git
-
cdinto repo directorycd CheckinWithme -
Install Prerequisite Libraries
pip3 install -r requirements.txt
-
Configure DataStaxAstra Cassandra Database
- Initialize CQL Database with keyspace
my_moods - Click on Connect in the initialized database. Download and add
secure-connect-database-name.zipto main directory.
- Initialize CQL Database with keyspace
-
Configure Google Cloud Services
- Create Service Account with
ownerrole - Enable Cloud Translation API
- Enable Cloud Natural Language API
- Create Service Account with
-
Add tokens to
config/config.json- Bot tokens for Discord can be found in the Discord Developer Portal.
- Copy tokens from DataStax Astra Database into
config/config.json - Download Google Cloud Key JSON to
/config/ - Include path to Google Cloud JSON in
config.json
{ "_Discord Bot": "Import Bot Tokens below if applicable", "token": "", "token_test": "", "_DataStacks Astra Keys_": "Import your DataStax Astra Keys below", "secure_connect_bundle": "<PATH-TO-SECURE-CONNECT-BUNDLE.zip>", "CLIENT_ID": "", "CLIENT_SECRET":"", "G_CLOUD_SERVICE_KEYFILE": "config/your-google-cloud-service-keyfile.json", } -
Add tokens for Reddit and IBM Watson Tone Analysis to
config/reddit_keys.json,config/watson.json- Create an application using a Reddit account here to find the required tokens
- Create an IBM Watson Tone Analyzer instance here and import the API key and url
// reddit_keys.json { "_Reddit": "Import Application Tokens Below:", "personal_use": "", "secret": "" } // watson.json { "Watson Tone Recognition AI": "Import API key and URL below:", "API_key": "", "url": "" }
When Pip joins your server, it will create a read-only channel called #daily-check-in. Every 24 hours, Pip will make an announcement reminding you to message it with a quick message on how your day is going so far.
Whenever you feel like logging how you feel, you can save an entry by messaging Pip using the >checkin command! Type out your message after the >checkin command for Pip to analyze and log how you feel.
- If you feel more comfortable expressing how you feel in your own language, Pip is completely able to understand your language as well as responding back using the same language!
- Pip logs your emotions throughout the day! You can let Pip know how you are feeling at any time, not just once per day!
- e.g.
>checkin Things have been going my way recently, I am grateful for my luck! - par ex.
>checkin Les choses vont dans mon sens ces derniers temps, je suis reconnaissant pour ma chance!
- e.g.
Pip logs how you are feeling whenever you check in with it! You can view how you felt over the past seven days by viewing your >history!
Rate:
- You can also let Pip know how you are feeling with the '
>rate' command! Please include one of the following:| Anger | Fear | Joy | Sadness |with the command. This provides a more direct and accurate method for our systems to track your mood.- For instance, you could type
>rate Sadnessto let Pip know you're feeling down at the moment.
- For instance, you could type
Motivation:
- Sends motivational messages to cheer you on to bigger and better.
Resource
- Generates a random resource to help you develop your mental health!
Optimizations:
- Replace long if-else trees with native switch-statements upon Python
3.10release. - Move embeds from
bot.pyto a separate file.
Features:
- Voice Recognition in
>checkin- Analyses .audio files that users record and send to bot
- Interactive Web UI to explore mood history in more depth
- Streak-detection
- Identifies streaks in good moods and compliments users
- Thoughts/Gratitude Journal Support
- Stores & Analyzes Journals, easily accessible on future Web UI
- Chatbot feature
- Allows users to casually converse with the b
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Eric Ji - Linkedin - eric868.ji@gmail.com
Katherine Li Linkedin - katherineli03.kkl@gmail.com
Timothy Zheng - Linkedin - tim123643@gmail.com
Yang Xu - Linkedin - boyangfu1991@gmail.com
Devpost Link: https://devpost.com/software/check-in-with-me
- Pip's avatar from Canva, use granted through Pro subscription
- MLH Mental Health Hacks
- Google Cloud Credits from Google
- Linode Credits from Linode
- DataStax Astra Credits by DataStax Astra



