- π Overview
- π¦ Features
- π Structure
- π» Installation
- ποΈ Usage
- π Hosting
- π License
- π Authors
The repository contains a project called "discord-games-bot-expansion" that provides a comprehensive solution for creating an interactive Discord game bot. It leverages the power of TypeScript, Discord.js, MySQL, and Redis to deliver a rich and engaging gaming experience within Discord servers.
Feature | Description | |
---|---|---|
βοΈ | Architecture | The codebase follows a modular architectural pattern, ensuring maintainability and scalability. |
π | Documentation | This README file provides a detailed overview of the project, its dependencies, and usage instructions. |
π | Dependencies | The codebase relies on various external libraries and packages such as Discord.js, MySQL, Redis, and others. |
𧩠| Modularity | The modular structure allows for easier maintenance and reusability of the code. |
π§ͺ | Testing | Implement unit tests to ensure the reliability and robustness of the codebase. |
β‘οΈ | Performance | Performance is optimized through efficient code practices, database indexing, and caching. |
π | Security | Robust security measures are implemented to protect user data and prevent unauthorized access. |
π | Version Control | Utilizes Git for version control with GitHub Actions for automated build and release processes. |
π | Integrations | Seamlessly integrates with the Discord API, utilizing its features for bot functionality. |
πΆ | Scalability | The bot is designed to handle increased user load and data volume, ensuring a smooth experience. |
βββ commands
β βββ gameCommands.js
β βββ adminCommands.js
β βββ userCommands.js
β βββ helpCommands.js
β βββ leaderboardCommands.js
βββ events
β βββ ready.js
β βββ messageCreate.js
β βββ guildMemberAdd.js
β βββ interactionCreate.js
βββ games
β βββ hangman.js
β βββ trivia.js
β βββ wordle.js
β βββ cardGames.js
β βββ customGames.js
βββ services
β βββ gameService.js
β βββ leaderboardService.js
β βββ adminService.js
β βββ userService.js
β βββ databaseService.js
βββ utils
β βββ commandHandler.js
β βββ logger.js
β βββ errorHandler.js
β βββ messageUtils.js
βββ config
β βββ config.js
β βββ databaseConfig.js
βββ .env
βββ package.json
βββ README.md
- Node.js
- npm
- Docker
- Clone the repository:
git clone https://github.com/spectra-ai-codegen/discord-games-bot-expansion.git
- Navigate to the project directory:
cd discord-games-bot-expansion
- Install dependencies:
npm install
- Start the development server:
npm start
- Open your browser and navigate to http://localhost:3000.
Adjust configuration settings in config.js
or .env
.
- π Example 1:
/startgame hangman
: Starts a hangman game. - π Example 2:
/leaderboard trivia
: Displays the leaderboard for the trivia game. - π Example 3:
/addgame wordle
: Adds the wordle game to the server's game library (admin command).
- Build the Docker image:
docker build -t discord-games-bot-expansion .
- Run the container:
docker run -d -p 3000:3000 discord-games-bot-expansion
- Create a new app on the hosting platform (e.g., Heroku, AWS).
- Deploy the code using the hosting platform's instructions.
DISCORD_TOKEN
: Your Discord bot token.DB_HOST
: Database host.DB_USER
: Database user.DB_PASS
: Database password.
- POST /api/games: Creates a new game.
- GET /api/games: Retrieves a list of games.
- POST /api/games/:gameId/start: Starts a game.
- POST /api/games/:gameId/join: Joins a game.
- POST /api/games/:gameId/leave: Leaves a game.
- GET /api/leaderboard/:gameId: Retrieves the leaderboard for a game.
Use JWT tokens for authentication.
curl -X POST -H "Content-Type: application/json" \
-d '{"name": "Hangman", "description": "Classic word guessing game.", "type": "word"}' \
http://localhost:3000/api/games
curl -X GET http://localhost:3000/api/games
This project is licensed under the GNU AGPLv3.
- Author Name - Spectra.codes
- Creator Name - DRIX10
Why only generate Code? When you can generate the whole Repository!