solaluset / DandelionMusic

Discord music bot written in Python that supports YouTube, SoundCloud, Spotify, Bandcamp, Twitter and custom files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DandelionMusic

A Discord music bot written in Python with support for Youtube, SoundCloud, Spotify, Bandcamp, Twitter, and custom files.

Keep in mind:

What's Coming?

  • See TODO in Projects tab

Prerequisites:

API Keys

Obtained keys must be entered into config.json (or set as environment variables)

Requirements (skip this if you've decided to use pre-built exe)

  • Installation of Python 3.8+

Install dependencies:

pip install -r requirements.txt
Windows

Download ffmpeg and put it into a folder in PATH.

If ffmpeg is not found, the script will try to download it automatically.

Other platforms

Install ffmpeg and libopus packages.

Installing - Self hosting

  1. Download release if available, alternatively download repository zip
  2. Complete Prerequisites
  3. Start run.py in project root (or the exe)
  4. See configuration options in config.json (more info at https://github.com/solaluset/DandelionMusic/wiki/Configuration)

Button play plugin:

  • Set emoji with the setting command to enable this feature
  • Emote must be available for bot
  • Needs Manage Message permissions

Custom Cookies:

  • Extract cookies.txt from you browser using your preferred method
  • Overwrite the existing cookies.txt in /config/cookies/
  • (Optional) Set a custom cookies.txt location by modifying COOKIE_PATH in config.py

Docker image

You can find pre-built Docker image at https://hub.docker.com/repository/docker/solaluset/dandelion-music/

See https://github.com/solaluset/DandelionMusic/wiki/Configuration for description of environment variables.

Commands:

Music

After the bot has joined your server, use d!help to display help and command information.

d!p [link/video title/key words/playlist-link/soundcloud link/spotify link/bandcamp link/twitter link]
  • Plays the audio of supported website
    • A link to the video (https://ww...)
    • The title of a video ex. (Gennifer Flowers - Fever Dolls)
    • A link to a YouTube playlist
  • If a song is playing, it will be added to queue

Playlist Commands

d!skip / d!s
  • Skips the current song and plays next in queue.
d!q
  • Show the list of songs in queue
d!shuffle / d!sh
  • Shuffle the queue
d!l / d!loop [all/single/off]
  • Loops the entire queue by default. d!loop single loops current track.
d!mv / d!move
  • Move song position in queue

Audio Commands

d!pause
  • Pauses the current song.
d!resume
  • Resumes the paused song.
d!prev
  • Goes back one song and plays the last song again.
d!np
  • Shows more details about the current song.
d!volume / d!vol
  • Adjust the volume 1-100%
  • Pass no arguments for current volume
d!remove / d!rm
  • Removes a song from the queue (defaults to last song)
d!stop / d!st
  • Stops the current song and clears the playqueue.

General

d!settings / d!setting / d!set
  • No Arguments: Lists server settings
  • Arguments: (setting) (value)
  • Omit the value to reset a setting
  • Example: d!setting start_voice_channel ChannelName
  • Administrators and DJs only
d!c
  • Connects the bot to the user's voice channel
d!dc
  • Disconnects the bot from the current voice channel
d!history
  • Shows you the titles of the X last played songs. Configurable in config.json

Utility

d!reset / d!rs
  • Resets the player. May recover the bot after unexpected problems.
d!ping
  • Test bot connectivity
d!addbot
  • Displays information on how to add the bot to another server of yours.
d!shutdown
  • Stops the bot completely. May be useful after you move the bot to background. Works only for bot owner.
  • Note that unlike other commands, this one doesn't have a slash variant. This allows it to be hidden.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Acknowledgements

https://github.com/adriansteffan/DiscordJockey

About

Discord music bot written in Python that supports YouTube, SoundCloud, Spotify, Bandcamp, Twitter and custom files

License:GNU General Public License v3.0


Languages

Language:Python 99.1%Language:Dockerfile 0.9%Language:Procfile 0.0%