Skip to content

ansonjwhe/MoodMSG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

83 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MoodMSG

๐ŸŽญ Sentiment Analysis for Discord Messages

A full-stack Discord bot and web application that analyzes message sentiment using Google Cloud NLP


๐Ÿ“‹ Overview

MoodMSG is an intelligent Discord bot that reads user messages and analyzes sentiment using Google Cloud's Natural Language API. Users can track their emotional patterns through an interactive web dashboard that visualizes their past messages and sentiments over time.

Key Features

  • ๐Ÿค– Real-time Discord Bot - Analyzes messages as they're sent in channels
  • ๐Ÿ“Š Sentiment Analysis - Uses Google Cloud NLP for accurate emotion detection
  • ๐Ÿ“ˆ Data Visualization - Interactive charts showing sentiment trends
  • ๐ŸŽญ Sentiment Tracking - View historical message data and mood patterns
  • ๐ŸŽจ Modern Web UI - Beautiful React-based dashboard

๐Ÿ› ๏ธ Tech Stack

Discord Bot

  • Language: Python 3
  • Framework: Discord.py
  • NLP: Google Cloud Natural Language API
  • Data Processing: Pandas, NumPy, Matplotlib
  • Database: MongoDB
  • APIs: Tenor API

Web Application

  • Frontend: React, Redux
  • UI Framework: Ant Design, React Bootstrap
  • Backend: Node.js, Express
  • Database: MongoDB (via Mongoose)

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.7+
  • Node.js 14+
  • MongoDB database
  • Google Cloud account with Natural Language API enabled
  • Discord Bot token
  • Tenor API key (optional)

Installation

1. Clone the repository

git clone https://github.com/yourusername/MoodMSG.git
cd MoodMSG

2. Set up Discord Bot

# Install Python dependencies
pip install -r requirements.txt

# Create a .env file
touch .env

# Add your credentials to .env
echo "token=YOUR_DISCORD_BOT_TOKEN" >> .env
echo "tenorkey=YOUR_TENOR_API_KEY" >> .env

3. Set up Google Cloud

# Download your Google Cloud service account key
# Save it as cred.json in the root directory

4. Set up Web Application

# Install server dependencies
cd server
npm install
cd ..

# Install client dependencies
cd client
npm install
cd ..

5. Configure MongoDB

Update the MongoDB connection string in bot.py with your credentials.

Running the Application

Start the Discord Bot

python bot.py

Start the Backend Server

cd server
node index.js

Start the Frontend

cd client
npm start

The web application will be available at http://localhost:3000


๐Ÿ“– Usage

Discord Commands

  • The bot automatically analyzes messages in Discord channels
  • Check your sentiment history on the web dashboard

Web Dashboard

  • View your message history
  • See sentiment trends over time
  • Explore interactive visualizations

๐ŸŽฏ Project Journey

The Challenge

Creating our first Discord bot with NLP integration, while also building a full-stack applicationโ€”all within a tight 36-hour timeframe.

Accomplishments

  • โœ… Successfully integrated Google Cloud NLP for sentiment analysis
  • โœ… Built a working Discord bot from scratch
  • โœ… Created a full-stack web application with data visualization
  • โœ… Completed the project on schedule despite taking 2 hours to finalize the idea
  • โœ… Collaborated effectively in a remote team setting

Lessons Learned

Our team explored new technologies and strengthened weak areas:

  • Python development for some team members
  • React and Redux for frontend development
  • MongoDB for data persistence
  • BeautifulSoup for web scraping
  • NLP API integration

๐Ÿ”ฎ Future Enhancements

  • User authentication and route security
  • Cloud deployment (Heroku/AWS/DigitalOcean)
  • Expanded statistics and analytics
  • Enhanced UI/UX improvements
  • Multi-server support
  • Customizable sentiment categories
  • Message filtering and privacy controls

๐Ÿ“„ License

ISC


๐Ÿ‘ฅ Contributors

Built with โค๏ธ by the MoodMSG team during a hackathon


Made during a 36-hour hackathon

Analyzing emotions, one message at a time ๐ŸŽญ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors