An open API service indexing awesome lists of open source software.

https://github.com/coslynx/discord-mini-games-hub

Project: Discord Server Mini Game Bot. Created at https://spectra.codes, which is owned by @Drix10
https://github.com/coslynx/discord-mini-games-hub

code-generation code-quality command-handling database developer-tools devops discord-api discord-bot discord-js event-handling game-library game-management javascript leaderboard machine-learning mini-games mysql node-js software-development user-interface

Last synced: 3 months ago
JSON representation

Project: Discord Server Mini Game Bot. Created at https://spectra.codes, which is owned by @Drix10

Awesome Lists containing this project

README

        




discord-mini-games-hub


A Discord bot that provides an engaging collection of mini-games to enhance server communities


Developed with the software and tools below.



Framework used
Frontend languages
Backend language
Database used



git-last-commit
GitHub commit activity
GitHub top language

## 📑 Table of Contents
- 📍 Overview
- đŸ“Ļ Features
- 📂 Structure
- đŸ’ģ Installation
- đŸ—ī¸ Usage
- 🌐 Hosting
- 📄 License
- 👏 Authors

## 📍 Overview
This repository contains the source code for a Discord bot called "discord-mini-games-hub". This bot provides an engaging collection of mini-games to enhance server communities, fostering interaction, healthy competition, and fun.

## đŸ“Ļ Features
| | Feature | Description |
|----|--------------------|--------------------------------------------------------------------------------------------------------------------|
| đŸ•šī¸ | Mini-Game Selection | The bot offers a diverse range of mini-games, including trivia, word games, reaction tests, and skill-based challenges. Players can browse the game list and select their preferred choice. |
| 🎮 | Game Initiation | Users can easily initiate games using simple commands. They can specify the desired game, invite other players, and manage game settings. |
| 🏆 | Gameplay and Scoring | The bot guides players through gameplay with clear instructions and prompts. It interprets player responses, tracks game progress, and manages scoring systems. |
| 📈 | Leaderboards and Achievements | The bot displays ranked players based on their performance in various games. Achievements are awarded for completing tasks or reaching milestones within games, promoting friendly competition. |
| âš™ī¸ | Customization and Server Integration | Server administrators can customize aspects of the bot, such as game themes, rules, and access permissions, tailoring it to specific server needs. |
| đŸ’Ŧ | User Interface | The bot provides a user-friendly interface through Discord commands and responses, minimizing confusion and facilitating smooth interaction with clear instructions. |

## 📂 Structure
```
discord-mini-games-hub/
├── commands
│ ├── gameSelection.js
│ ├── gameStart.js
│ ├── gamePlay.js
│ ├── leaderboard.js
│ ├── achievements.js
│ ├── serverSettings.js
│ └── help.js
├── events
│ ├── ready.js
│ ├── messageCreate.js
│ ├── guildCreate.js
│ ├── guildDelete.js
│ ├── interactionCreate.js
│ └── error.js
├── services
│ ├── gameService.js
│ ├── userService.js
│ ├── serverService.js
│ └── databaseService.js
├── models
│ ├── gameModel.js
│ ├── userModel.js
│ ├── serverModel.js
│ └── leaderboardModel.js
├── utils
│ ├── commandHandler.js
│ ├── logger.js
│ └── errorHandler.js
├── config
│ ├── env.config.js
│ └── database.config.js
├── routes
│ ├── api.js
│ └── gameRoutes.js
├── middleware
│ ├── authentication.js
│ ├── authorization.js
│ └── validation.js
├── .env
└── package.json

```

## đŸ’ģ Installation
### 🔧 Prerequisites
- Node.js
- npm
- MySQL

### 🚀 Setup Instructions
1. Clone the repository:
- `git clone https://github.com/spectra-ai-codegen/discord-mini-games-hub.git`
2. Navigate to the project directory:
- `cd discord-mini-games-hub`
3. Install dependencies:
- `npm install`
4. Create a `.env` file in the root directory and add the following environment variables:
```
DISCORD_TOKEN=your_discord_bot_token
MYSQL_HOST=your_mysql_host
MYSQL_USER=your_mysql_user
MYSQL_PASSWORD=your_mysql_password
MYSQL_DATABASE=your_mysql_database
```
5. Set up your MySQL database and create a database with the name specified in your `.env` file.
6. Run the following command to start the bot:
- `npm start`

## đŸ—ī¸ Usage
### đŸƒâ€â™‚ī¸ Running the Project
The bot will automatically connect to your Discord server and start listening for commands.

### âš™ī¸ Configuration
- Game Selection: Use `!games` to view the list of available mini-games.
- Game Initiation: Use `!start ` to start a game.
- Gameplay: Follow the instructions provided by the bot during gameplay.
- Leaderboards: Use `!leaderboard ` to view the leaderboard for a specific game.
- Achievements: The bot will automatically notify you of any achievements you unlock.
- Server Settings: Server administrators can customize the bot's behavior using `!settings`.

### 📚 Examples
- Example 1: Starting a trivia game with two players:
- `!start trivia @player1 @player2`
- Example 2: Viewing the leaderboard for the "wordle" game:
- `!leaderboard wordle`

## 🌐 Hosting
### 🚀 Deployment Instructions
1. Set up your database: Create a MySQL database on a hosting platform like AWS RDS, Google Cloud SQL, or a self-managed database server.
2. Configure environment variables: Add your database credentials and Discord bot token to a `.env` file.
3. Deploy to a hosting platform: Choose a suitable platform like Heroku, AWS Elastic Beanstalk, or a serverless platform like AWS Lambda.
4. Set up the bot: Create a Discord application and a bot user, then add the bot to your Discord server.
5. Run the bot: Start the bot on your hosting platform.

## 📜 License
This project is licensed under the [GNU AGPLv3](https://choosealicense.com/licenses/agpl-3.0/).

## đŸ‘Ĩ Authors
- Author Name - [Spectra.codes](https://spectra.codes)
- Creator Name - [DRIX10](https://github.com/Drix10)


🌐 Spectra.Codes




Why only generate Code? When you can generate the whole Repository!