Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 2.39 KB

README.md

File metadata and controls

58 lines (43 loc) · 2.39 KB

Configurable Discord Bot

This is a simple Discord bot that can be configured using JSON files. It uses PostgreSQL to persist user reputation scores and provides a few additional features such as a minesweeper game and integration with YouTube's API to fetch recent uploads from configured channels.

This project's motivation is primarily to build some more experience using CI/CD tools, Docker, and Google Cloud Platform. The bot itself is a just fun little app that is built into a Docker image, uploaded to DockerHub, and then deployed to a GCP compute engine VM.

Since the bot isn't really the focus of this project, please refer to the source code's documentation for how to create a config and extend the bot. If you have any questions please feel free to get in touch and I'll be happy to help!

Features

  • Configuration: The bot can be configured using JSON files. You can specify various settings such as response messages, command prefixes, and emoji reactions.

  • User Reputation: The bot uses PostgreSQL to store and manage user reputation scores. Users can earn reputation points by participating in the server and engaging with other users or by playing games.

  • Minesweeper Game: The bot includes a simple minesweeper game that users can play within the Discord server.

  • YouTube Integration: The bot integrates with YouTube's API to fetch recent uploads from configured channels. Users can stay updated with the latest videos from their favorite channels directly within the Discord server.

Getting Started

  1. Clone the repository:
git clone [email protected]:OfcPeriwinkle/configurable_discord_bot.git
  1. Change into the project directory:
cd configurable_discord_bot
  1. Create a virtual environment:
python3 -m venv .venv
  1. Activate the virtual environment:
source .venv/bin/activate
  1. Install the package:
pip install -e .
  1. Set up environment variables for Discord, Supabase, and YouTube (see below)
  2. Run the bot:
bot_runner config.json

Environment Variables

  • SUPABASE_URL: The URL of your Supabase database.
  • SUPABASE_KEY: The API key for your Supabase database.
  • DISCORD_TOKEN: The bot token for your Discord bot.
  • GOOGLE_API_KEY: The API key for the YouTube Data API's service account.

Configuration

The bot can be configured by creating a JSON file and pointing the bot_runner script at it.