Skip to content

coslynx/discord-audio-playback-bot

Repository files navigation


discord-audio-playback-bot

Enhance your Discord experience with seamless music playback.

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

The repository contains a project called "discord-audio-playback-bot" that provides a comprehensive solution to enhance the music experience in Discord servers through seamless playback from various music platforms.

📦 Features

Feature Description
🎵 Music Playback Integrates multiple music sources like YouTube, Spotify, and SoundCloud for streaming music live in Discord.
⏱️ Queue Management Users can manage their own song queues, allowing songs to be added, viewed, and controlled in a structured format.
🔊 Volume Control Provides commands to adjust the volume, including mute and unmute functionalities.
⚙️ Dynamic Commands A set of essential commands for playback control (play, pause, skip, stop) along with a help command.
🔐 User Permissions Only users with specified roles can manage the bot, ensuring controlled usage to prevent spam.
📂 Playlist Creation Users can create custom playlists and share these with others, enhancing community interaction.
🔍 Search Functionality Allows users to search for songs directly from the bot, even previewing songs before adding them to the queue.
🔗 API Integrations Connects with various music service APIs to provide a diverse library of music.

📂 Structure

discord-audio-playback-bot/
├── commands/
│   ├── play.js
│   ├── skip.js
│   ├── stop.js
│   ├── queue.js
│   ├── help.js
│   └── search.js
├── events/
│   ├── message.js
│   ├── guildMemberAdd.js
│   ├── ready.js
│   └── voiceStateUpdate.js
├── models/
│   ├── userModel.js
│   ├── playlistModel.js
│   └── songModel.js
├── services/
│   ├── musicService.js
│   ├── queueService.js
│   ├── playlistService.js
│   ├── userService.js
│   └── permissionService.js
├── utils/
│   ├── commandHandler.js
│   ├── logger.js
│   ├── errorHandler.js
│   ├── configLoader.js
│   └── permissionsHandler.js
├── config/
│   ├── env.config.js
│   └── database.config.js
├── routes/
│   ├── api.js
│   └── musicRoutes.js
└── middleware/
    ├── authentication.js
    ├── permissions.js
    └── logging.js

💻 Installation

🔧 Prerequisites

  • Node.js
  • npm
  • MongoDB

🚀 Setup Instructions

  1. Clone the repository:
    git clone https://github.com/spectra-ai-codegen/discord-audio-playback-bot.git
  2. Navigate to the project directory:
    cd discord-audio-playback-bot
  3. Install dependencies:
    npm install

🏗️ Usage

🏃‍♂️ Running the Project

  1. Start the bot:
    npm start
  2. Ensure your bot is added to your Discord server and interact using commands defined in commands/.

⚙️ Configuration

Adjust configuration settings in .env to include your Discord bot token and other necessary API keys.

🌐 Hosting

🚀 Deployment Instructions

You can deploy the bot on services like Heroku, AWS, or DigitalOcean following the standard deployment practices of Node.js applications.

🔑 Environment Variables

Add the following to your .env:

  • DISCORD_TOKEN: Your Discord Bot Token
  • MONGODB_URI: MongoDB connection string

📜 License

This project is licensed under the MIT License.

👥 Authors

🌐 Spectra.Codes

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