Supersceded by https://github.com/karyeet/Tangerine
A Node.js Discord music bot made using the latest versions of Discord.js & play-dl
Mandarine was created as a personal Music Bot in lieu of Rythm Bot (RIP).
- Spotify Listen Along
- Soundcloud streaming
- Youtube streaming
- Spotify & Deezer link support
- play, pause, resume, skip, remove, queue
- Detailed queue embed with buttons to increment pages
- Other detailed embeds
- Deletes its own messages to avoid clutter
- Light weight & universal
- Support deezer as a source
- Local file support
- Youtube playlist support
- Spotify playlist support
- Partial support for voice commands
- Help command
- Docker image
- Currently undergoing Typescript rewrite
- Deezer Playlist support
- Multi-threaded streaming
- Prefix command & other customizations
- Volume
- Preload next song for seamless playing
- Voice recognition for play command
Create a discord bot then add the bot to your server.
In the discord developer dashboard, toggle on:
- PRESENCE INTENT
- SERVER MEMBERS INTENT
- MESSAGE CONTENT INTENT
Example docker-compose.yml:
version: "3"
services:
mandarine:
container_name: mandarine_music_bot
image: karyeet/mandarine:latest
volumes:
- ./config/config.json:/Mandarine/config.json:ro
- ./config/models/:/Mandarine/voice/models:ro
- ./mandarineFiles:/root/mandarineFiles
- ./playdlData:/Mandarine/.data
environment:
- "arl=5a2e"
restart: unless-stopped
Create a folder and create your docker-compose.yml inside it. In the same folder create a folder called config, within this folder paste your config.json. An example config can be found in the repository. If you want to use the picovoice backed voice commands, paste your models within a folder called models within the config folder.
To use >music, you must provide your deezer arl token to the environment. Replace "5a2e" with your full arl token in the docker-compose.yml file.
To authorize play-dl with spotify or youtube, run this command while inside the same folder as your docker-compose.yml. Specify that you would like to save to file:
sudo docker run -it --rm -v "./playdlData:/.data" karyeet/mandarine:latest /bin/ash -c "node /Mandarine/Docker/authorize.js"
Before anything, install Node v16 LTS and create a discord bot then add the bot to your server.
In the discord developer dashboard, toggle on:
- PRESENCE INTENT
- SERVER MEMBERS INTENT
- MESSAGE CONTENT INTENT
then
- Download the Zip Archive
- Unzip archive to a directory of your choosing
- Create a file called config.json in the directory and copy the config example to the file, then configure as necessary. (token is required)
- Get your bot token from the discord developer dashboard
- Open command prompt or terminal in the chosen directory
- Run
npm install
- To start the bot run
node .
ornpm start
To make use of the >music command, deemix must be installed via python3 -m pip install deemix
To support spotify links, play-dl must have spotify authorization. Check the wiki.
To automatically add local tagged mp3s to the localLibrary.json, add the files to the music folder ($home$/mandarineFiles
) and run the indexer.js file found in ./music/indexer.js
using node.