A discord bot for listening to music from Youtube and Soundcloud.
It uses a Web Browser to open the links and captures the audio output into the Discord BOT.
- Play videos from Youtube and Soundcloud on your voice channel
- Search videos by title
- Play videos directly by youtube link
- Play Soundcloud links
- Queue system (add, next, clear)
- Only listen to commands on specific channel
- Currently playing is displayed on Discord bot status
- Loop
- No queue limit
- No video duration limit
Starts playing a Youtube video or Soundcloud audio. If you pass a custom search string, it will first search for the video on youtube. Then, it will play the video on your current voice channel.
Pauses the current video.
Adds the video to the queue.
Supports links from Youtube and Soundcloud.
Supports search query on Youtube.
List all videos from queue.
Plays the next video from the queue.
Clear all videos from queue.
Enable or disable loop mode for queue.
Enable or disable random mode for queue.
Enable or disable repeat mode for current item.
Takes a screenshot of the currently opened link.
You will need a linux machine (local or VPS) with:
- Docker
- docker-compose
- SSH access
Instructions:
- Create a
.env
file based on.env.example
- You will need to create a Discord App to get a Discord Token for
.env
file - Point
SSH_SERVER
andSSH_FOLDER
to your server SSH connection and deployment folder - Run
npm run deploy
to deploy evenrything to your server
You will need:
- NodeJS 16
- Docker
- docker-compose
Folder structure:
src/commands
: a typescript file for each command handlersrc/services
discord
: service to handle discord APIconnection
: service to save voice and text channel stateplayer
: service to handle player/streammetadata
: service to handle Youtube and Soundcloud searchstream
: service to handle download stream from Youtube and Soundcloudqueue
: service to store queue state
src/index.ts
: entrypoint
Instructions:
- Install dependencies
sudo apt update
sudo apt install ffmpeg
- Install NodeJS packages
npm install
- Start BOT
npm start