A Discord music bot built with Rust and serenity-rs with support for YouTube videos, playlists, and livestreams.
Command | Subcommand | Description |
---|---|---|
play | - | Play a Youtube video, livestream, or playlist. |
stop | - | Stop the current track and clear the queue. |
leave | - | Leave the voice channel. |
track | pause | Pause the current track. |
| | resume | Resume a paused track. |
| | skip | Skip the current track. |
⊥ | info | Show the current track's metadata and play status. |
queue | show | Show the metadata of the first five tracks in the queue. |
| | clear | Clear all or the first n tracks from the queue. |
| | shuffle | Shuffle the queue. |
⊥ | reverse | Reverse the queue. |
- Rich embeds and interactive widgets.
- Soundcloud support.
- Spotify support.
- Install Rust and
cargo
, if you don't have them setup already. Instructions are available here. - Install yt-dlp for video to audio conversion (depends on ffmpeg).
- Create a
Secrets.toml
file in the project's root folder and populate it with the following key value pairs.
DISCORD_TOKEN = "<insert Discord token>"
YOUTUBE_API_KEY = "<insert YouTube API key>"
# To run the bot for a single guild only, you can specify the guild id.
# This is optional.
GUILD_ID = "<insert guild id>"
- Execute
cargo run
orcargo run --release
.
Coming Soon...
Discord intents must be configured correctly, otherwise the client will be refused access to Discord servers.
Priviliged Intents: Server Members Intent.
Text Permissions: Send Messages.
Voice Permissions: Connect, Speak.
Migrated from shuttle.rs and rocket to tokio, due to shuttle.rs limitations.
Added support for searching for playlists on YouTube.
Add optional parameter for queue show to control number of queue elements shown.
Fixed bug where queued items would not play after a song finishes or is skipped.
Added Dockerfile to streamline configuration for deployment.
Created base client and client state map with poise.
Configured songbird for voice state activities.
Implemented general commands: play, leave, stop
Implemented queue commands: show, clear, reverse, shuffle
Implemented track commands: pause, resume, info, skip
Added track and inactivity event handlers.
YouTube playlist and live stream support completed.
Laid groundwork for SoundCloud support. (Support impeded by API policy changes)