Moodsic: A Discord Bot that generates mood based playlists and plays them directly in your discord server's voice channels.
Made as a part of MLH's New Hack Who This? Hackathon.
Music AI
- Create a virtual environment & install dependencies.
python -m venv venv
# Windows
venv/Scripts/activate
# MacOS/Linux
source venv/bin/activate
pip install -r requirements.txt
- Put required environment variables in
.env
file.
BOT_PREFIX="!"
BOT_TOKEN="XXXXXXXXXXXXXX"
SPOTIFY_CLIENT_ID="XXXXXXXXXXXXXX"
SPOTIFY_CLIENT_SECRET="XXXXXXXXXXXXXX"
LASTFM_API_KEY="XXXXXXXXXXXXXX"
LASTFM_API_SECRET="XXXXXXXXXXXXXX"
- Start discord bot server.
python __main__.py
python scrape.py
jupyter notebook
- In the browser window opened after above command, select the 'Data Labelling.ipynb' file
- Run all the cells in the notebook to see the result.
Music playback functionality is taken from this gist: https://gist.github.com/vbe0201/ade9b80f2d3b64643d854938d40a0a2d