Skip to content

Vuurvos1/discordMusic

Repository files navigation

Discord music, a Discord bot that plays music Discord music, a Discord bot that plays music

Discord Music

A Discord bot that plays music

Commands

  • clear: clear the queue
  • leave: leave the voice channel
  • pause: pause the current song
  • play <song>: play a song, this can be a youtube url or a search query
  • queue: show the current queue
  • resume: resume the current song
  • shuffle: shuffle the queue
  • skip: skip the current song
  • stop: stop the current song and clear the queue

Setup and instalation

Rust

First of all make sure you have Rust installed. You can find the official installation guide here.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Note

You might need to add the following if you are using linux

sudo apt update
sudo apt install build-essential libc6-dev cmake pkg-config libopus-dev

yt-dlp

This bot uses yt-dlp to search and stream audio. For installation instructions, you can refer to the official yt-dlp installation guide.

Note

When installing yt-dlp through pip, you might need to add the following to your .bashrc / .zshrc

export PATH="$HOME/.local/bin:$PATH"

Adding the bot to your server

  1. Navigate to the Discord Developer Portal.
  2. Select your application.
  3. Under the "OAuth2" > "URL Generator" section, select the bot and applications.commands scopes.
  4. A URL will be generated at the bottom of the page. Copy this URL and paste it into your browser.
  5. Select the server you want to add the bot to and click "Authorize".
  6. Back in the Discord Developer Portal, go to the "Bot" page.
  7. Under "Privileged Gateway Intents", ensure "Message Content Intent" is enabled if your bot needs to read message content.
  8. Under "Bot Permissions", grant the bot "Administrator" rights. Alternatively, you can enable all necessary voice and text-related permissions individually for more granular control.

Environment variables

Copy the .env.example file to .env and fill in the values.

About

A Discord bot that plays music

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors