Skip to content

Project: Discord Music Bot: Play Your Favorite Tunes. Created at https://spectra.codes, which is owned by @Drix10

Notifications You must be signed in to change notification settings

coslynx/Discord-Music-Bot-Enhanced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


discord-music-bot-enhanced

An enhanced Discord music bot with advanced features and a robust architecture.

Developed with the software and tools below.

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-enhanced" project, a comprehensive Discord music bot built using a combination of modern technologies. The bot leverages the power of React, JavaScript, HTML, CSS, and Node.js to provide a user-friendly and feature-rich experience.

πŸ“¦ Features

Feature Description
🎢 Music Playback Supports playback from various sources (YouTube, SoundCloud, Spotify) with queue management, shuffling, looping, and volume control.
πŸ’¬ Command Handling Offers a comprehensive command system, including both text-based and slash commands for intuitive interaction.
πŸ”’ Permissions Uses Discord's role system to restrict command usage, ensuring only authorized users can perform actions like skipping songs.
🌐 Server Integration Seamlessly connects to multiple Discord servers, joins voice channels, and maintains a persistent connection for continuous playback.
🎨 UI (Optional) Includes a simple UI for managing playlists and bot configuration.
πŸ€– AI Integration (Optional) Leverages OpenAI's API for natural language processing tasks, such as command interpretation and music recommendations.
πŸ—οΈ Modular Architecture The project is designed with a modular architecture for easy maintenance and scalability.
πŸ§ͺ Testing Comprehensive testing suite ensures the bot's reliability and robustness.
⚑️ Performance Prioritizes efficient code for optimal performance.
πŸ” Security Implements security measures to prevent malicious actions and data breaches.
🌐 Scalability Designed to handle a large number of users and servers, utilizing cloud hosting and database solutions.
🌍 Multilingual Support (Optional) Supports multiple languages to cater to a wider user base.
πŸ“Š Analytics (Optional) Tracks metrics for analyzing user engagement and improving the bot's functionality.

πŸ“‚ Structure

discord-music-bot-enhanced/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ commands/
β”‚   β”‚   β”œβ”€β”€ play.ts
β”‚   β”‚   β”œβ”€β”€ skip.ts
β”‚   β”‚   β”œβ”€β”€ stop.ts
β”‚   β”‚   β”œβ”€β”€ queue.ts
β”‚   β”‚   β”œβ”€β”€ help.ts
β”‚   β”‚   └── nowPlaying.ts
β”‚   β”œβ”€β”€ events/
β”‚   β”‚   β”œβ”€β”€ ready.ts
β”‚   β”‚   β”œβ”€β”€ messageCreate.ts
β”‚   β”‚   β”œβ”€β”€ voiceStateUpdate.ts
β”‚   β”‚   └── interactionCreate.ts
β”‚   β”œβ”€β”€ music/
β”‚   β”‚   β”œβ”€β”€ musicPlayer.ts
β”‚   β”‚   β”œβ”€β”€ queue.ts
β”‚   β”‚   β”œβ”€β”€ utils.ts
β”‚   β”‚   β”œβ”€β”€ song.ts
β”‚   β”‚   └── musicHandlers.ts
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ logger.ts
β”‚   β”‚   β”œβ”€β”€ commandHandler.ts
β”‚   β”‚   β”œβ”€β”€ errorHandler.ts
β”‚   β”‚   └── permissions.ts
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”‚   β”œβ”€β”€ guild.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ user.ts
β”‚   β”‚   β”‚   └── playlist.ts
β”‚   β”‚   β”œβ”€β”€ database.ts
β”‚   β”‚   └── migrations/
β”‚   β”‚       └── migration.ts
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── config.ts
β”‚   └── index.ts
β”œβ”€β”€ .env
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ vite.config.js
└── .github/
    └── workflows/
        └── ci.yml

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker (optional)

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/spectra-ai-codegen/discord-music-bot-enhanced.git
  2. Navigate to the project directory:
    • cd discord-music-bot-enhanced
  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.ts' or '.env'.

πŸ“š Examples

  • πŸ“ Example 1: How to use Feature 1
  • πŸ“ Example 2: How to use Feature 2

🌐 Hosting

πŸš€ Deployment Instructions

  1. Build the project:
    • npm run build
  2. (Optional) Create a Docker image:
    • docker build -t discord-music-bot-enhanced .
  3. (Optional) Run the Docker container:
    • docker run -p 3000:3000 discord-music-bot-enhanced

Heroku or any host, choose the one best for the project

  1. Install the Heroku CLI:
    • npm install -g heroku
  2. Login to Heroku:
    • heroku login
  3. Create a new Heroku app:
    • heroku create
  4. Deploy the code:
    • git push heroku main

πŸ”‘ Environment Variables

  • DISCORD_BOT_TOKEN: Your Discord bot token (required)
  • SPOTIFY_CLIENT_ID: Your Spotify client ID (required for Spotify playback)
  • SPOTIFY_CLIENT_SECRET: Your Spotify client secret (required for Spotify playback)
  • SOUNDCLOUD_CLIENT_ID: Your SoundCloud client ID (required for SoundCloud playback)
  • SOUNDCLOUD_CLIENT_SECRET: Your SoundCloud client secret (required for SoundCloud playback)
  • DATABASE_URL: Your database connection string (required for persistent storage)
  • OPENAI_API_KEY: Your OpenAI API key (required for AI features)

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/items: Retrieves a list of items.
  • POST /api/items: Creates a new item.

πŸ”’ Authentication

Use JWT tokens for authentication.

πŸ“ Examples

  • curl -X GET http://localhost:3000/api/items

πŸ“œ License

This project is licensed under the GNU AGPLv3.

πŸ‘₯ Authors

🌐 Spectra.Codes

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