This bot is using the Discord.js wrapper for the Discord API. It's main functionality is playing music from YouTube for which it uses Play-dl as it's main package. Apart from Discord.js and Play-dl, the code has been written from scratch and is very customizable/editable. The bot can currently run concurrently on multiple guilds/servers and supports the following features:
- Play music using youtube URL: !play yt-url
- Play music using the youtube video name: !play video name
- Play a youtube playlist: !play playlist url (If the playlist contains unavailable videos, it won't work)
- Play a spotify song/album/playlist !play spotify-url
- Songs get automatically queued. You can check the current queue: !queue
- Skip the current song: !skip
- Pause the current song: !pause
- Resume the current song: !resume
- Seek into a song: !seek
- Loop the current song: !loop
- Help to display all available commands: !help
To run the bot all you have to do is clone the repository and in the main directory create an .env file containing your BOT_TOKEN, GUILD_ID and CLIENT_ID (GUILD_ID and CLIENT_ID are used for slash commands). Then run the usual npm install and npm start and everything should be up and running.
- Slash commands are for now global, for testing purposes uncomment and replace the lines in commandRegister.js, guild commands are generally better for testing as changes take place instantly, global commands modifications might take a while before showing up
- In order to get the youtube cookies it is recommended to follow the guide from play-dl in order to play videos which require signup for age verificatio. The authorization.js file has been left in the repository. Run node authorization.js for setup
- Playing from Spotify URLs only works if authentication is provided, for that please also follow the guide from play-dl. The authorization.js file has been left in the repository. Run node authorization.js for setup