DiscordMusicBot icon indicating copy to clipboard operation
DiscordMusicBot copied to clipboard

A Discord Bot for playing YouTube music.

DiscordMusicBot

A Discord Bot for playing YouTube music.

Installing

Windows

  1. Add this Music Bot to your Discord Server
  2. Build yourself or Download this Music Bot and extract into DiscordMusicBot/
  3. Modify config.json
  4. Install .NET Core
  5. Optionally (Reinstall newer versions):
  6. Run
    • Open DiscordMusicBot.bat
    • ..\DiscordMusicBot\> dotnet DiscordMusicBot.dll

Linux

  1. Add this Music Bot to your Discord Server
  2. Build yourself or Download this Music Bot and extract into DiscordMusicBot/
  3. Modify config.json
  4. Install .NET Core
  5. Optionally (Reinstall newer versions):
    • Download FFmpeg and place into DiscordMusicBot/ folder
    • Download youtube-dl: and place into DiscordMusicBot/ folder
      sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
      
      sudo chmod a+rx /usr/local/bin/youtube-dl
      
    • Download Sodium and/or Opus and place them into DiscordMusicBot/ folder
  6. Run
$ dotnet DiscordMusicBot.dll

Build

  1. Get Source files
    • Clone Repo: git clone http://github.com/mrousavy/DiscordMusicBot
    • Download ZIP
  2. Download and Install .NET Core SDK
  3. Open DiscordMusicBot/ in any Terminal
  4. Restore NuGet Packages: dotnet restore
  5. Build Project: dotnet build
  6. Publish: dotnet publish -c release -r win10-x64 (Find your OS)

Configure

config.json

  1. Create your app here
  2. Create DiscordMusicBot/config.json file
  3. Paste this into config.json and set your values
    {
    "ClientId": "[app Client ID]",
    "ClientSecret": "[app secret]",
    "BotName": "[app name]",
    "Token": "[app token]",
    "ServerName": "My Discord Server",
    "VoiceChannelName": "Lounge 1",
    "TextChannelName": "general"
    }
    

users.txt

  1. Enter names into users.txt (Name#Id, e.g.: Me#123)
  2. Send DiscordMusicBot !update to update Permitted Client List, or restart

Commands

!add [url] ... Adds a single Song to Music-queue

!addPlaylist [playlist-url] ... Adds whole playlist to Music-queue

!pause ... Pause the queue and current Song

!play ... Resume the queue and current Song

!queue ... Prints all queued Songs & their User

!clear ... Clear queue and current Song

!setTimeout [timeoutInMilliseconds] ... Timeout between being able to request songs

!help ... Prints available Commands and usage

!come ... Let Bot join your Channel

!update ... Updates the Permitted Clients List from clients.txt

!skip ... Skips the current Song