This project is a Discord bot that fetches movie and TV show data from TheMovieDB.
Here are the main files in the project:
-
Dockerfile: This file contains the instructions to build the Docker image for the bot.
-
example.env: This file contains example environment variables needed by the bot.
-
main.py: This is the main Python script that runs the bot.
-
requirements.txt: This file lists the Python dependencies required by the bot.
-
GitHub Actions workflows: These workflows automate the building and pushing of the Docker image, and the creation of releases.
-
Helm chart: This directory contains the Helm chart for deploying the bot to a Kubernetes cluster.
-
TheMovieDB module: This directory contains the Python module for interacting with TheMovieDB API.
To use the bot, you need to set the following environment variables:
THEMOVIEDB_API_KEY: Your API key for TheMovieDB.DISCORD_BOT_TOKEN: Your Discord bot token.
You can set these variables in a .env file in the root directory of the project, or directly in your environment.
Once the environment variables are set, you can run the bot with the following command:
python3 main.pyYou can also run the bot in a Docker container. First, build the Docker image with the following command:
docker build -t discord-themoviedb-bot .docker run -d --env-file .env discord-themoviedb-botReplace .env with the path to your environment file.
You can deploy the bot to a Kubernetes cluster using the provided Helm chart. First, update the values.yaml file with your values. Then, install the Helm chart with the following command:
helm install discord-themoviedb-bot ./helm-chart