Skip to content

Project: Discord Music Bot with Premium Features and 70+ Slashcommands. Created at https://spectra.codes, which is owned by @Drix10

Notifications You must be signed in to change notification settings

coslynx/discord-music-bot-premium-features

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

68 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


discord-music-bot-premium-features

A Discord music bot with premium features for an immersive and engaging music experience.

Developed with the software and tools below.

Framework: React Frontend: Javascript, Html, Css Backend: Node.js LLMs: Custom, Gemini, OpenAI

git-last-commit GitHub commit activity GitHub top language

πŸ“‘ Table of Contents

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

πŸ“ Overview

This repository houses the "discord-music-bot-premium-features" project, a comprehensive solution built using a robust tech stack. This bot is designed to revolutionize the music experience on Discord, offering a plethora of features for both free and premium users. It utilizes the latest web technologies, including React, JavaScript, HTML, CSS, Node.js, and advanced LLMs like Gemini and OpenAI, to provide an intuitive, interactive, and engaging user experience.

πŸ“¦ Features

Feature Description
βš™οΈ Architecture The codebase is meticulously structured using a modular architectural pattern, ensuring that different functionalities are separated into distinct directories. This promotes better organization, readability, and ease of maintenance as the project scales.
πŸ“„ Documentation The repository includes a comprehensive README file that guides users through the project's intricacies, dependencies, and usage instructions.
πŸ”— Dependencies The project relies on various external libraries and packages, including React, uuid, esbuild, and eslint. These tools play vital roles in building, styling, and optimizing the UI components and managing interactions with external services.
🧩 Modularity The codebase is designed with modularity in mind. This means different functionalities are isolated into separate directories and files, such as background, components, and content. This approach promotes code reusability, reduces complexity, and facilitates easier updates and modifications.
πŸ§ͺ Testing The project emphasizes robust testing to ensure high code quality. Implement unit tests using frameworks like Jest or React Testing Library, meticulously covering various scenarios and edge cases to catch potential issues early in the development process. This approach leads to a more stable and reliable codebase.
⚑️ Performance The performance of the bot is a priority. Optimizations are implemented throughout the project, considering factors such as browser capabilities and hardware resources. Techniques like code splitting, lazy loading, and caching are utilized to enhance responsiveness and efficiency.
πŸ” Security Security is paramount. Implementing robust security measures is vital to protect user data and ensure a safe and trustworthy environment. This includes practices such as rigorous input validation to prevent malicious input, data encryption to protect sensitive information, and secure communication protocols to safeguard data exchange.
πŸ”€ Version Control The project uses Git for version control, with GitHub Actions workflow files set up for automated build and release processes. This streamlined workflow ensures consistency and reduces manual effort.
πŸ”Œ Integrations The bot seamlessly integrates with browser APIs, external services through HTTP requests, and incorporates speech recognition and synthesis APIs. This integration extends the bot's capabilities, allowing for richer features and enhanced interactions.
πŸ“Ά Scalability To handle future growth, the project is designed with scalability in mind. Caching strategies are employed to reduce database load, and cloud-based solutions are leveraged to ensure the bot can handle increasing user loads and data volumes without compromising performance.

πŸ“‚ Structure

β”œβ”€β”€ commands
β”‚   β”œβ”€β”€ play.js
β”‚   β”œβ”€β”€ pause.js
β”‚   β”œβ”€β”€ resume.js
β”‚   β”œβ”€β”€ skip.js
β”‚   β”œβ”€β”€ stop.js
β”‚   β”œβ”€β”€ volume.js
β”‚   β”œβ”€β”€ seek.js
β”‚   β”œβ”€β”€ nowplaying.js
β”‚   β”œβ”€β”€ queue.js
β”‚   β”œβ”€β”€ add.js
β”‚   β”œβ”€β”€ remove.js
β”‚   β”œβ”€β”€ clear.js
β”‚   β”œβ”€β”€ shuffle.js
β”‚   β”œβ”€β”€ loop.js
β”‚   β”œβ”€β”€ repeat.js
β”‚   β”œβ”€β”€ search.js
β”‚   β”œβ”€β”€ find.js
β”‚   β”œβ”€β”€ recommend.js
β”‚   β”œβ”€β”€ lyrics.js
β”‚   β”œβ”€β”€ createplaylist.js
β”‚   β”œβ”€β”€ addtoplaylist.js
β”‚   β”œβ”€β”€ removefromplaylist.js
β”‚   β”œβ”€β”€ playplaylist.js
β”‚   β”œβ”€β”€ join.js
β”‚   β”œβ”€β”€ leave.js
β”‚   β”œβ”€β”€ move.js
β”‚   β”œβ”€β”€ invite.js
β”‚   β”œβ”€β”€ connect.js
β”‚   β”œβ”€β”€ help.js
β”‚   β”œβ”€β”€ info.js
β”‚   β”œβ”€β”€ ping.js
β”‚   β”œβ”€β”€ stats.js
β”‚   β”œβ”€β”€ settings.js
β”‚   β”œβ”€β”€ profile.js
β”‚   └── 247.js
β”œβ”€β”€ events
β”‚   β”œβ”€β”€ ready.js
β”‚   β”œβ”€β”€ interactionCreate.js
β”‚   β”œβ”€β”€ messageCreate.js
β”‚   β”œβ”€β”€ voiceStateUpdate.js
β”‚   └── guildCreate.js
β”œβ”€β”€ services
β”‚   β”œβ”€β”€ musicService.js
β”‚   β”œβ”€β”€ queueService.js
β”‚   β”œβ”€β”€ playlistService.js
β”‚   β”œβ”€β”€ userService.js
β”‚   β”œβ”€β”€ premiumService.js
β”‚   └── databaseService.js
β”œβ”€β”€ models
β”‚   β”œβ”€β”€ user.js
β”‚   β”œβ”€β”€ playlist.js
β”‚   β”œβ”€β”€ song.js
β”‚   └── subscription.js
β”œβ”€β”€ utils
β”‚   β”œβ”€β”€ commandHandler.js
β”‚   β”œβ”€β”€ logger.js
β”‚   β”œβ”€β”€ errorHandler.js
β”‚   β”œβ”€β”€ playlistGenerator.js
β”‚   β”œβ”€β”€ musicVisualizer.js
β”‚   └── voiceCommandHandler.js
β”œβ”€β”€ config
β”‚   β”œβ”€β”€ env.config.js
β”‚   β”œβ”€β”€ database.config.js
β”‚   └── lavalink.config.js
β”œβ”€β”€ routes
β”‚   β”œβ”€β”€ api.js
β”‚   └── musicRoutes.js
β”œβ”€β”€ middleware
β”‚   β”œβ”€β”€ authentication.js
β”‚   β”œβ”€β”€ permissions.js
β”‚   β”œβ”€β”€ logging.js
β”‚   └── rateLimiter.js
β”œβ”€β”€ .env
β”œβ”€β”€ package.json
└── README.md

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/coslynx/discord-music-bot-premium-features.git
  2. Navigate to the project directory:
    • cd discord-music-bot-premium-features
  3. Install dependencies:
    • npm install

πŸ—οΈ Usage

πŸƒβ€β™‚οΈ Running the Project

  1. Start the development server:
    • npm start
  2. Open your browser and navigate to http://localhost:3000.

βš™οΈ Configuration

Adjust configuration settings in 'config.js' or '.env' files as required.

πŸ“š Examples

  • Example 1: Playing a song with the /play command:
    • /play [song name] - Searches and queues the specified song, starting playback in the voice channel.
  • Example 2: Creating a playlist with the /createplaylist command:
    • /createplaylist [playlist name] - Creates a new playlist for the user.
  • Example 3: Enabling 24/7 playback with the /247 command (for premium users):
    • /247 - Enables continuous music playback in a dedicated voice channel for premium subscribers.

🌐 Hosting

πŸš€ Deployment Instructions

Recommended Options:

  • Heroku: This is a popular choice for deploying Node.js applications. Follow the Heroku deployment instructions provided in the project's documentation.
  • AWS: For larger-scale deployments and advanced features, consider deploying the bot on AWS. You can use services like Elastic Beanstalk or EC2 instances for hosting.
  • Google Cloud: Similar to AWS, Google Cloud provides services like App Engine and Compute Engine for hosting your bot.

Deployment Steps (Generic):

  1. Configure Environment Variables: Ensure all necessary environment variables (API keys, database credentials) are set up in the appropriate environment configuration files.
  2. Build the Application: Build the project for production using npm run build or a similar command.
  3. Create a Deployment Script: Create a deployment script (if not already provided) to automate the deployment process. This script should handle tasks like building, bundling, and uploading the bot's code.
  4. Deploy the Code: Use your chosen hosting provider's tools and documentation to deploy the bot.

Environment Variables:

  • DISCORD_TOKEN: Your Discord bot token (find it in the Discord Developer Portal).
  • DB_HOST: Your database host.
  • DB_USER: Your database username.
  • DB_PASS: Your database password.
  • DB_NAME: Your database name.
  • LAVALINK_HOST: Your Lavalink server host.
  • LAVALINK_PASSWORD: Your Lavalink server password.
  • STRIPE_SECRET_KEY: Your Stripe secret key (if using Stripe for premium subscriptions).
  • PAYPAL_CLIENT_ID: Your PayPal client ID (if using PayPal for premium subscriptions).
  • PAYPAL_SECRET: Your PayPal secret (if using PayPal for premium subscriptions).

πŸ“œ License

This project is licensed under the GNU AGPLv3.

πŸ‘₯ Authors

🌐 Spectra.Codes

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