Skip to content

A simple Discord music bot using Python and yt-dlp.

Notifications You must be signed in to change notification settings

Ryzen-1fd/Discord-Music-Bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Discord Music Bot 🎵

A simple Discord music bot built with Python and yt-dlp, allowing users to play music from YouTube directly in their Discord voice channels. The bot includes basic features like playing songs, skipping tracks, and managing a song queue.

Basic Features

  • Play Music: Play songs from YouTube by searching or providing a direct link.
  • Skip Tracks: Skip the current track to play the next one in the queue.

Getting Started

Prerequisites

Make sure you have the following installed:

  • Python 3.8 or higher
  • discord.py library
  • yt-dlp library
  • ffmpeg (for audio processing)

Installation,

  1. Clone the repository:

    git clone https://github.com/yourusername/discord-music-bot.git
    cd discord-music-bot
  2. Install dependencies: Create and activate a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate

    Install required Python packages:

    pip install -r requirements.txt
  3. Setup your Discord bot:

  4. Run the bot:

    python bot.py #(bot = your file name)

Usage

  1. Invite the bot to your server:

    • Generate an OAuth2 URL with the bot scope and administrator or Connect and Speak permissions from the Developer Portal and use it to invite the bot to your Discord server.
    • Must need Connect and Speak permissions
  2. Bot Commands:

    • !play <song name or URL>: Play a song or add it to the queue.
    • !skip: Skip the currently playing song.

Example

  • !play never gonna give you up: Searches YouTube for the song and plays it in the voice channel.
  • !skip: Skips to the next song in the queue.

Contributing

If you'd like to contribute to this project, feel free to fork the repository and submit a pull request. Please ensure your code follows the existing style and structure.

Acknowledgements

  • discord.py - The Python API wrapper for Discord.
  • yt-dlp - A command-line program to download videos from YouTube and other video sites.
  • FFmpeg - A complete, cross-platform solution to record, convert and stream audio and video.

License

This project is licensed under me LICENSE,
Contact for more details, Click me. https://discord.gg/edEe8tr42D

About

A simple Discord music bot using Python and yt-dlp.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%