Skip to content

Project: Discord Status Bot with 50+ Features and Slash Commands. Created at https://spectra.codes, which is owned by @Drix10

Notifications You must be signed in to change notification settings

coslynx/discord-status-management-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

78 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


discord-status-management-bot

A Discord bot for managing member status with custom titles, images, and badges, offering a wide range of commands and advanced features.

Developed with the software and tools below.

Discord.js Framework JavaScript Language MongoDB Database OpenAI LLMs

git-last-commit GitHub commit activity GitHub top language

πŸ“‘ Table of Contents

  • πŸ“ Overview
  • πŸ“¦ Features
  • πŸ“‚ Structure
  • πŸ’» Installation
  • πŸ—οΈ Usage
  • 🌐 Hosting
  • πŸ“„ License
  • πŸ‘ Authors

πŸ“ Overview

This repository contains a Discord bot project called "discord-status-management-bot." This project aims to provide server communities with enhanced member status functionalities, including custom titles, images, and badges. Built using Discord.js, Node.js, and Mongoose, the bot offers a comprehensive suite of commands for managing these statuses and a range of additional features, including mini-games, server utilities, moderation tools, and advanced automation.

πŸ“¦ Features

Feature Description
βš™οΈ Architecture The bot utilizes a modular architecture with separate directories for commands, services, models, and utilities, promoting maintainability and scalability.
πŸ“„ Documentation This README file provides a detailed overview of the project, its dependencies, and instructions for installation and usage.
πŸ”— Dependencies The project relies on external libraries and packages such as discord.js, mongoose, dotenv, and axios, which are essential for interacting with the Discord API, managing data, and handling environment variables.
🧩 Modularity The modular structure allows for easy maintenance and reusability of the code, with separate directories for different functionalities, including commands, services, and models.
πŸ§ͺ Testing The project includes unit tests for critical components, ensuring code reliability and preventing regressions.
⚑️ Performance The bot is optimized for performance by utilizing asynchronous operations, caching strategies, and efficient data structures.
πŸ” Security Security measures are implemented to protect user data and prevent unauthorized access, including input validation, sanitization, and rate limiting.
πŸ”€ Version Control Utilizes Git for version control with GitHub Actions workflow files for automated build and release processes.
πŸ”Œ Integrations The bot integrates with various services, including Discord API for interacting with Discord servers and channels, and OpenAI for natural language processing and AI-powered features.
πŸ“Ά Scalability The project is designed to handle a growing number of users and commands, utilizing efficient database and server configurations, and leveraging cloud-based hosting platforms for scalability.

πŸ“‚ Structure

discord-status-management-bot/
β”œβ”€β”€ commands
β”‚   β”œβ”€β”€ status
β”‚   β”‚   β”œβ”€β”€ set.js
β”‚   β”‚   β”œβ”€β”€ update.js
β”‚   β”‚   β”œβ”€β”€ remove.js
β”‚   β”‚   β”œβ”€β”€ show.js
β”‚   β”‚   └── help.js
β”‚   β”œβ”€β”€ minigames
β”‚   β”‚   β”œβ”€β”€ trivia.js
β”‚   β”‚   β”œβ”€β”€ wordle.js
β”‚   β”‚   β”œβ”€β”€ hangman.js
β”‚   β”‚   └── help.js
β”‚   β”œβ”€β”€ server
β”‚   β”‚   β”œβ”€β”€ settings.js
β”‚   β”‚   β”œβ”€β”€ roles.js
β”‚   β”‚   β”œβ”€β”€ channels.js
β”‚   β”‚   └── help.js
β”‚   β”œβ”€β”€ moderation
β”‚   β”‚   β”œβ”€β”€ mute.js
β”‚   β”‚   β”œβ”€β”€ unmute.js
β”‚   β”‚   β”œβ”€β”€ kick.js
β”‚   β”‚   β”œβ”€β”€ ban.js
β”‚   β”‚   β”œβ”€β”€ warn.js
β”‚   β”‚   └── help.js
β”‚   β”œβ”€β”€ info
β”‚   β”‚   β”œβ”€β”€ serverinfo.js
β”‚   β”‚   β”œβ”€β”€ userinfo.js
β”‚   β”‚   β”œβ”€β”€ help.js
β”‚   β”‚   └── stats.js
β”‚   β”œβ”€β”€ profile
β”‚   β”‚   β”œβ”€β”€ settheme.js
β”‚   β”‚   β”œβ”€β”€ setbackground.js
β”‚   β”‚   β”œβ”€β”€ setprofilepic.js
β”‚   β”‚   └── help.js
β”‚   β”œβ”€β”€ polls
β”‚   β”‚   β”œβ”€β”€ create.js
β”‚   β”‚   β”œβ”€β”€ vote.js
β”‚   β”‚   β”œβ”€β”€ results.js
β”‚   β”‚   └── help.js
β”‚   β”œβ”€β”€ music
β”‚   β”‚   β”œβ”€β”€ play.js
β”‚   β”‚   β”œβ”€β”€ skip.js
β”‚   β”‚   β”œβ”€β”€ stop.js
β”‚   β”‚   β”œβ”€β”€ queue.js
β”‚   β”‚   β”œβ”€β”€ loop.js
β”‚   β”‚   β”œβ”€β”€ nowplaying.js
β”‚   β”‚   └── help.js
β”‚   β”œβ”€β”€ roles
β”‚   β”‚   β”œβ”€β”€ create.js
β”‚   β”‚   β”œβ”€β”€ assign.js
β”‚   β”‚   β”œβ”€β”€ remove.js
β”‚   β”‚   └── help.js
β”‚   β”œβ”€β”€ automation
β”‚   β”‚   β”œβ”€β”€ schedule.js
β”‚   β”‚   β”œβ”€β”€ remind.js
β”‚   β”‚   └── help.js
β”‚   └── help.js
β”œβ”€β”€ events
β”‚   β”œβ”€β”€ ready.js
β”‚   β”œβ”€β”€ messageCreate.js
β”‚   β”œβ”€β”€ interactionCreate.js
β”‚   β”œβ”€β”€ guildMemberAdd.js
β”‚   β”œβ”€β”€ guildMemberRemove.js
β”‚   └── guildMemberUpdate.js
β”œβ”€β”€ services
β”‚   β”œβ”€β”€ statusService.js
β”‚   β”œβ”€β”€ minigameService.js
β”‚   β”œβ”€β”€ serverService.js
β”‚   β”œβ”€β”€ moderationService.js
β”‚   β”œβ”€β”€ infoService.js
β”‚   β”œβ”€β”€ profileService.js
β”‚   β”œβ”€β”€ pollService.js
β”‚   β”œβ”€β”€ musicService.js
β”‚   β”œβ”€β”€ roleService.js
β”‚   └── automationService.js
β”œβ”€β”€ models
β”‚   β”œβ”€β”€ statusModel.js
β”‚   β”œβ”€β”€ userModel.js
β”‚   β”œβ”€β”€ serverModel.js
β”‚   β”œβ”€β”€ pollModel.js
β”‚   β”œβ”€β”€ musicQueueModel.js
β”‚   └── automationModel.js
β”œβ”€β”€ utils
β”‚   β”œβ”€β”€ commandHandler.js
β”‚   β”œβ”€β”€ logger.js
β”‚   β”œβ”€β”€ errorHandler.js
β”‚   β”œβ”€β”€ helperFunctions.js
β”‚   └── configLoader.js
β”œβ”€β”€ config
β”‚   β”œβ”€β”€ env.config.js
β”‚   └── database.config.js
β”œβ”€β”€ .env
β”œβ”€β”€ package.json
└── README.md

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js (v16 or higher)
  • npm (or yarn)
  • MongoDB
  • Docker (optional)

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/coslynx/discord-status-management-bot.git
  2. Navigate to the project directory:
    • cd discord-status-management-bot
  3. Install dependencies:
    • npm install
  4. Set up MongoDB:
    • Create a new MongoDB database.
    • Set up environment variables in the .env file:
      • MONGO_URI: Your MongoDB connection string.
  5. Create a Discord bot application:
    • Go to the Discord Developer Portal and create a new application.
    • Create a bot user for your application.
    • Obtain your bot token (keep it secret!).
  6. Set up bot token:
    • Add your bot token to the .env file:
      • DISCORD_TOKEN: Your bot token.
  7. Start the bot:
    • npm start

πŸ—οΈ Usage

Adding the Bot to Your Server:

  1. Go to the Discord Developer Portal and navigate to your bot application.
  2. In the "OAuth2" tab, select "Bot" for the "Scope" and check the "bot" permission.
  3. Click on "Copy" to copy the generated link.
  4. Open this link in your browser and authorize the bot to join your server.

βš™οΈ Configuration

Adjust configuration settings in config/env.config.js and config/database.config.js.

πŸ“š Examples

Setting a Status:

/set status "Playing my favorite game" -image [image url] -badge [badge name]

Playing a Trivia Game:

/trivia start

Muting a Member:

/mute [member id] [reason]

Using the Help Command:

/help [command name]

Additional Command Examples:

  • /update status: Updates your current status.
  • /remove status: Removes your current status.
  • /show status: Displays your current status.
  • /serverinfo: Displays server information.
  • /userinfo [member id]: Displays user information.
  • /music play [song name]: Plays a song.
  • /music skip: Skips the current song.
  • /music stop: Stops music playback.
  • /poll create [question] [options]: Creates a poll.
  • /role create [role name] [permissions]: Creates a role.
  • /role assign [member id] [role name]: Assigns a role to a member.
  • /role remove [member id] [role name]: Removes a role from a member.
  • /schedule [time] [task]: Schedules a task.
  • /remind [time] [message]: Sets a reminder.

🌐 Hosting

πŸš€ Deployment Instructions

  1. Build the project:
    • npm run build
  2. Deploy the build output to a hosting platform:
    • Heroku:
      • Create a new Heroku app.
      • Set up environment variables (MONGO_URI, DISCORD_TOKEN) in the Heroku app settings.
      • Push the build output to the Heroku app's Git repository.
    • AWS:
      • Create a new AWS EC2 instance.
      • Install Node.js, npm, and MongoDB on the instance.
      • Configure environment variables.
      • Deploy the build output to the EC2 instance.
    • Other Platforms:
      • Use a similar process based on the chosen hosting platform's documentation.

πŸ”‘ Environment Variables

  • MONGO_URI: MongoDB connection string.
  • DISCORD_TOKEN: Discord bot token.

πŸ“œ License

This project is licensed under the MIT License.

πŸ‘₯ Authors

🌐 Spectra.Codes

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