https://github.com/chocomeow/iufi
A Discord bot designed for card collecting and mini-games specifically for the IU community
https://github.com/chocomeow/iufi
discord ffmpeg iu iufi python
Last synced: over 1 year ago
JSON representation
A Discord bot designed for card collecting and mini-games specifically for the IU community
- Host: GitHub
- URL: https://github.com/chocomeow/iufi
- Owner: ChocoMeow
- Created: 2023-08-25T09:26:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T03:14:18.000Z (over 1 year ago)
- Last Synced: 2025-03-16T23:12:21.269Z (over 1 year ago)
- Topics: discord, ffmpeg, iu, iufi, python
- Language: Python
- Homepage:
- Size: 30.5 MB
- Stars: 5
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# 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

## Requirements
- Python 3.11 or above
- A `.env` file with the following variables:
```plaintext
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
```
2. Navigate to the project directory:
```
cd IUFI
```
3. 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
```
4. Create a .env file in the root directory and add your Discord bot token and MongoDB details.
5. 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.