Skip to content
/ IUFI Public

A Discord bot designed for card collecting and mini-games specifically for the IU community

Notifications You must be signed in to change notification settings

ChocoMeow/IUFI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IUFI

IUFI is a Discord bot designed for card collecting and mini-games specifically for the IU community. Built entirely with Python, this bot offers an engaging experience for users to collect cards and participate in fun mini-games.

Screenshots

Screenshot 2024-10-20 at 10 03 13 PM Screenshot 2024-10-20 at 10 05 59 PM Screenshot 2024-10-20 at 10 05 13 PM Screenshot 2024-10-20 at 10 03 48 PM Screenshot 2024-10-20 at 10 06 40 PM

Requirements

  • Python 3.11 or above
  • A .env file with the following variables:
TOKEN=DISCORD_BOT_TOKEN
MONGODB_URL=MONGODB_URL
MONGODB_NAME=MONGODB_NAME
  • A settings.json file containing the bot settings. This file is pre-filled with values based on the IUCord server but can be modified as needed.

Installation

  1. Clone this repository:
git clone https://github.com/ChocoMeow/IUFI.git
  1. Navigate to the project directory:
cd IUFI
  1. Install the required Python packages. It is recommended to use a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
  1. Create a .env file in the root directory and add your Discord bot token and MongoDB details.
  2. Modify the settings.json file as needed to customize your bot settings.

Enabling Music Quiz

To enable the music quiz feature in the bot, you must install ffmpeg in your environment. You can specify the path for the OPUS library in your settings.json file as follows:

{
  "OPUS_PATH": "path/to/your/opus/library"
}

If you do not provide the OPUS_PATH, the program will attempt to auto-detect the OPUS library. If detection fails, you will need to manually specify the path in the settings.json file.

Running the Bot

To start the bot, run the following command:

python main.py

Auto-Created Folders

Upon starting the bot, the following folders will be automatically created in the root directory:

  • images: This folder stores card images. Inside, you should create your own category folders that match the configuration in your settings.json.
  • newImages: Place any new card images you want to add to the bot in this folder. The bot will automatically update the database and move the images to the correct category folder in the images folder. Ensure that new card images follow the naming format category#.webp (e.g., common1.webp, common2.webp, rare1.webp, etc.).
  • musicTracks: This folder will automatically download music tracks using ytlib when players are participating in the music quiz.

Contributing

Contributions are welcome! If you have suggestions for improvements or features, feel free to submit a pull request.

About

A Discord bot designed for card collecting and mini-games specifically for the IU community

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages