BotBuster is a movie recommendation system that runs as a Discord bot. It fetches metadata from TMDB, processes it with a machine-learning model, and returns movie suggestions based on a user's watchlist.
BotBuster/
│
├── src/
│ ├── main.py
│ ├── data/
│ │ ├── data.py
│ │ └── movies.csv
│ │
│ └── model/
│ └── model.py
│
├── bot.py
├── watchlist.csv
├── watchlist.txt
├── requirements.txt
├── README.md
└── .env
- The user provides movie titles through Discord slash commands, which are added to
watchlist.txt. main.pyloads environment variables from.env(including the TMDB API key and optional model configuration parameters).- The system fetches detailed information for these titles from TMDB, including genres, keywords, cast, directors, and description as there are in
movies.csvto match it. - The fetched movie data is converted and saved as
watchlist.csvfor processing. - All gathered movie metadata is also cached in
movies.csvto speed up future requests. - The machine-learning model loads both
movies.csv(the complete cached dataset) andwatchlist.csv(the user's preferences). - By analyzing the watchlist, the model builds a profile of the user's unique taste and identifies similar movies from the cached dataset.
main.pyhandles all data processing and model execution, then feeds the formatted recommendations tobot.py.- The bot sends the personalized recommendations directly inside Discord.
- Create and activate a Python virtual environment:
Windows:
python -m venv .venv
.venv\Scripts\activateLinux/MacOS:
python3 -m venv .venv
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile:
TMDB_API_KEY=your_tmdb_api_key # Get from: https://www.themoviedb.org/settings/api
DISCORD_TOKEN=your_discord_bot_token # Get from: https://discord.com/developers/applications- Run the bot:
python bot.py- Test if the bot is running using
/pingin Discord.
Once running, the bot listens for slash commands in your server.
Note: The bot includes a Flask web server for compatibility with free hosting platforms that require a web endpoint.
| Command | Description |
|---|---|
/ping |
Check if the bot is online and responsive. |
/add_movie <title> |
Add a single movie to the watchlist. |
/add_list |
Paste multiple movie titles (line- or comma-separated). |
/watchlist |
Display all saved movies. |
/recommend |
Get one movie recommendation. |
/recommend_n <number> |
Get multiple recommendations. |
/clear_watchlist |
Erase all stored watchlist entries. |
/clear_messages |
Delete all messages in the current channel (permission required). |
- Genre-specific recommendations: Add
/recommend <genre>command to get recommendations filtered by specific genres (e.g.,/recommend action,/recommend comedy) - Multi-user support: Enable separate watchlists for different Discord users by migrating from CSV files to a database system
- Expanded movie catalog: Increase the dataset beyond the current ~10,000 movies for more diversity and better recommendations
- Rating system: Allow users to rate recommended movies to improve future suggestions
- Streaming availability: Integrate with streaming service APIs to show where movies are available to watch
- Movie details command: Add
/movie_info <title>to fetch detailed information about any movie - Watchlist analytics: Provide statistics and insights about the user's viewing preferences
Contributions are welcome! If you have ideas for improvements or new features, feel free to open a Pull Request. All contributions, bug reports, and feature requests are appreciated!
This project is licensed under the Apache License 2.0. See the LICENSE file for more details.