SandstormBot is a cross platform self hostable music bot for discord written in java. It's mainly aimed at smaller private discord servers.
Key features include:
- It runs on pretty much any hardware that supports java, including a RaspberryPi. (tested on a RaspberryPi 3B)
- It uses youtube-dl to download sound files and supports a wide variety of different hosting platforms. (any of these platforms should work: https://rg3.github.io/youtube-dl/supportedsites.html) It can also play local music files.
- Music can be sorted in playlists and played back in 3 modes:
- default (play songs in their default order)
- shuffle-track (play songs in a random order)
- shuffle-album (shuffle whole albums based on the song metadata)
- The interface is designed to be easily usable. Reaction buttons can be configured for highly used commands.
- Impulse response audio filters can be added to significantly enhance the listening experience.
- A JVM version 1.8 or newer.
- FFmpeg
- On Windows, download the newest version from https://www.ffmpeg.org/download.html.
- If you want to install the bot on a RaspberryPi, you need a newer FFmpeg version than is available on the standard repository. You can get one here: https://johnvansickle.com/ffmpeg/. If you want to use the default version, audio filters will not be available.
- youtube-dl
- On Windows, download the newest version from https://rg3.github.io/youtube-dl/download.html.
- On Linux, download youtube_dl through pip (the python package manager):
sudo pip install --upgrade youtube_dl
to install or update. - This dependency should be updated regularly.
- curl
- On windows, download the executable from https://curl.haxx.se/windows/.
- On Linux this is probably already installed. If it's not, install with:
sudo apt-get install curl
.
- Download the newest release.
- Extract the archive wherever you want.
- If you want to run the bot on a RaspberryPi I recommend extracting it on an external hard drive. The bot can write a lot of data to the file system, which can wear down the SD card.
- Copy
config/config_example.json
toconfig/config.json
. - Fill out the newly created
config/config.json
.- IMPORTANT If the external programs you use are not located in your $PATH, you have to modify the command locations in the config file.
- Add the bot to your server.
- Go to https://discordapp.com/oauth2/authorize?&client_id=CLIENT_ID&scope=bot&permissions=8.
- Replace
CLIENT_ID
with your bots client id. - Make sure the bot is listed as a user on your server before proceeding to the next step.
- Run the bot.
- On Windows
bin\sandstormBot.bat
. - On Linux
bin/sandstormBot
.
- On Windows
Experienced users may try to run development builds by cloning the repository and running the bot with gradlew run
.
!join
the bot will join your current voice channel
Manage playlists:
!playlist create <name>
create a playlist!playlist remove <name>
remove the specified playlist!playlist switch <name>
switch to the specified playlist!order <order>
set the playback order of the current playlist to<order>
- available options are
default
shuffle-track
shuffle-album
- available options are
Manage songs:
!add <search>
add a song (or multiple songs) to the current playlist!addl <search>
add a song (or multiple songs) from your local music directory to the current playlist!queue <search>
queue a song (or multiple songs) to be played once!queuel <search>
queue a song (or multiple songs) from your local music directory to be played once!remove <search>
remove a song (or multiple songs) from the current playlist!kick
remove the current song from the current playlist!next
skip to the next song!next <search>
skip to the next song that includes<search>
in its name!previous
skip to the previous song
Additional:
!filter <filtername>
set the impulse response filter to<filtername>
- Filters can be placed in the
IR
directory
- Filters can be placed in the
!filter
clears the impulse response filter!seek
seeks forwards or backwards, in seconds. For example-5
rewinds 5 seconds.