Basic Discord Music Bot
This app allows you to play audio tracks in a Discord voice channel
of your choice:
It also contains a simple system for queueing tracks in advance:
You can search for tracks or enter a direct YouTube link!
The only required setup is to get the id of a voice channel you would like to
designate as your server's "radio channel". You can find this id by right
clicking a voice channel in your server with developer mode enabled:
If you need help enabling developer mode, see this section of our guide on how to make a Discord bot.
Otherwise, you just need to pick a prefix for your bot, and you're all set!
As of August 31st 2022, Discord restricts your bot’s ability to see when messages are sent by server members. This means that you’ll be unable to use event triggers such as
bot_mention without enabling the Message Content Intent.
To enable this intent, head over to the Discord Developer Portal, click your bot’s name, then click the Bot button on the sidebar. Scroll down, and you’ll see a switch to turn on the Message Content Intent. If you get stuck, check out this guide for screenshots showing what to click.
If your bot is in over one hundred servers, you’ll need to complete Discord’s intent whitelisting process to enable the Message Content Intent.
All commands are shown with
! as a prefix, but you can set whatever you'd like
during setup or afterwards by modifying the
PREFIX environment variable.
!play <query>: Play or search for a track
!play Resume a paused track or play the latest track from the queue if the player is disconnected
!pause: Pause the currently playing track
!disconnect: Disconnect the bot from the voice channel
!nowplaying: Retrieve the current track and queued tracks
!queue: Same as
!enqueue <query>: Add a track to the queue
!skip: Skip currently playing track and play the next track in the queue
!clearqueue: Clear the current queue
!help: Bring up help menu
Queued tracks automatically play when the last track finishes.
This app uses the ytdl-core npm package
to stream from YouTube, which is frequently updated as YouTube makes changes.
If your bot has issues downloading a particular track, try again later or check
for an updated version of the dependency.
If you have any questions or feedback, please join our community Discord
from the Community tab in the top bar. You can also follow us on Twitter,