This page contains a list of all commands that can be used to control the MusicBot.
Every command must start with the prefix that is configured for your bot.
The default prefix for MusicBot is !
but we omit it in this documentation.
In usage descriptions, < >
denotes a required parameter, [ ]
denotes an optional parameter, and |
denotes multiple choices for the parameter.
Parameters or terms in lower-case are literal, and used as the argument value.
While upper-case parameters are just placeholders, you put in your own value(s).
Take this usage for example:
autoplaylist <add | remove> [URL]
It means you can use add
or remove
as the first parameter. The second parameter is a value you provide.
With the default prefix, an example of using the command would be:
!autoplaylist add https://link.to/my/song.mp3
General Commands
autoplaylist
Example usage:Description:
Manage auto playlist files and per-guild settings.
blocksong
Example usage:Description:
Manage a block list applied to song requests and extracted song data.
A subject may be a song URL or a word or phrase found in the track title.
If subject is omitted, any currently playing track URL will be added instead.
The song block list matches loosely, but is case-sensitive.
This means adding 'Pie' will match 'cherry Pie' but not 'piecrust' in checks.
blockuser
Example usage:Description:
Manage the users in the user block list.
Blocked users are forbidden from using all bot commands.
botversion
Example usage:Description:
Display MusicBot version number in the chat.
clean
Example usage:Description:
Search for and remove bot messages and commands from the calling text channel.
Optionally supply a number of messages to search through, 50 by default 500 max.
This command may be slow if larger ranges are given.
clear
Example usage:Description:
Removes all songs currently in the queue.
disconnect
Example usage:Description:
Force MusicBot to disconnect from the discord server.
follow
Example usage:Description:
Makes MusicBot follow a user when they change channels in a server.
help
Example usage:Description:
Show usage and description of a command, or list all available commands.
id
Example usage:Description:
Display your Discord User ID, or the ID of a mentioned user.
This command is deprecated in favor of Developer Mode in Discord clients.
karaoke
Example usage:Description:
Toggle karaoke mode on or off. While enabled, only karaoke members may queue songs.
Groups with BypassKaraokeMode permission control which members are Karaoke members.
latency
Example usage:Description:
Display API latency and Voice latency if MusicBot is connected.
leaveserver
Example usage:Description:
Force MusicBot to leave the given Discord server.
Names are case-sensitive, so using an ID number is more reliable.
listids
Example usage:Description:
List the Discord IDs for the selected category.
Returns all ID data by default, but one or more categories may be selected.
This command is deprecated in favor of using Developer mode in Discord clients.
move
Example usage:Description:
Swap existing songs in the queue using their position numbers.
Use the queue command to find track position numbers.
np
Example usage:Description:
Show information on what is currently playing.
pause
Example usage:Description:
Pause playback if a track is currently playing.
perms
Example usage:Description:
Get a list of your permissions, or the permissions of the mentioned user.
play
Example usage:Description:
Add a song to be played in the queue. If no song is playing or paused, playback will be started.
You may supply a URL to a video or audio file or the URL of a service supported by yt-dlp.
Playlist links will be extracted into multiple links and added to the queue.
If you enter a non-URL, the input will be used as search criteria on YouTube and the first result played.
MusicBot also supports Spotify URIs and URLs, but audio is fetched from YouTube regardless.
playnext
Example usage:Description:
A play command that adds the song as the next to play rather than last.
Read help for the play command for information on supported inputs.
playnow
Example usage:Description:
A play command which skips any current song and plays immediately.
Read help for the play command for information on supported inputs.
pldump
Example usage:Description:
Dump the individual URLs of a playlist to a file.
queue
Example usage:Description:
Display information about the current player queue.
Optional page number shows later entries in the queue.
remove
Example usage:Description:
Remove a song from the queue, optionally at the given queue position.
If the position is omitted, the song at the end of the queue is removed.
Use the queue command to find position number of your track.
However, positions of all songs are changed when a new song starts playing.
repeat
Example usage:Description:
Toggles playlist or song looping.
If no option is provided the current song will be repeated.
If no option is provided and the song is already repeating, repeating will be turned off.
resetplaylist
Example usage:Description:
Reset the auto playlist queue by copying it back into player memory.
This command will be removed in a future version, replaced by the autoplaylist command(s).
restart
Example usage:Description:
Attempts to restart the MusicBot in a number of different ways.
With no option supplied, a `soft` restart is implied.
It can be used to remotely update a MusicBot installation, but should be used with care.
If you have a service manager, we recommend using it instead of this command for restarts.
resume
Example usage:Description:
Resumes playback if the player was previously paused.
search
Example usage:Description:
Search a supported service and select from results to add to queue.
Service and number arguments can be omitted, default number is 3 results.
Select from these services:
- yt, youtube (default)
- sc, soundcloud
- yh, yahoo
seek
Example usage:Description:
Restarts the current song at the given time.
If time starts with + or - seek will be relative to current playback time.
Time should be given in seconds, fractional seconds are accepted.
Due to codec specifics in ffmpeg, this may not be accurate.
setnick
Example usage:Description:
Change the MusicBot's nickname.
setprefix
Example usage:Description:
Override the default command prefix in the server.
The option EnablePrefixPerGuild must be enabled first.
shuffle
Example usage:Description:
Shuffle all current tracks in the queue.
shuffleplay
Example usage:Description:
Play command that shuffles playlist entries before adding them to the queue.
shutdown
Example usage:Description:
Disconnect from all voice channels and close the MusicBot process.
skip
Example usage:Description:
Skip or vote to skip the current playing song.
Members with InstaSkip permission may use force parameter to bypass voting.
If LegacySkip option is enabled, the force parameter can be ignored.
speed
Example usage:Description:
Change the playback speed of the currently playing track only.
The rate must be between 0.5 and 100.0 due to ffmpeg limits.
Streaming playback does not support speed adjustments.
stream
Example usage:Description:
Add a media URL to the queue as a Stream.
The URL may be actual streaming media, like Twitch, Youtube, or a shoutcast like service.
You can also use non-streamed media to play it without downloading it.
Note: FFmpeg may drop the stream randomly or if connection hiccups happen.
summon
Example usage:Description:
Tell MusicBot to join the channel you're in.
uptime
Example usage:Description:
Displays the MusicBot uptime, or time since last start / restart.
volume
Example usage:Description:
Set the output volume level of MusicBot from 1 to 100.
Volume parameter allows a leading + or - for relative adjustments.
The volume setting is retained until MusicBot is restarted.
Owner Commands
botlatency
Example usage:Description:
Display latency information for Discord API and all connected voice clients.
cache
Example usage:Description:
Display information about cache storage or clear cache according to configured limits.
Using update option will scan the cache for external changes before displaying details.
checkupdates
Example usage:Description:
Display the current bot version and check for updates to MusicBot or dependencies.
config
Example usage:Description:
Manage options.ini configuration from within Discord.
joinserver
Example usage:Description:
Generate an invite link that can be used to add this bot to another server.
option
Example usage:Description:
Deprecated command, use the config command instead.
setalias
Example usage:Description:
Allows management of aliases from discord. To see aliases use the help command.
setavatar
Example usage:Description:
Change MusicBot's avatar.
Attaching a file and omitting the url parameter also works.
setcookies
Example usage:Description:
Allows management of the cookies feature in yt-dlp.
When updating cookies, you must upload a file named cookies.txt
If cookies are disabled, uploading will enable the feature.
Uploads will delete existing cookies, including disabled cookies file.
WARNING:
Copying cookies can risk exposing your personal information or accounts,
and may result in account bans or theft if you are not careful.
It is not recommended due to these risks, and you should not use this
feature if you do not understand how to avoid the risks.
setname
Example usage:Description:
Change the bot's username on discord.
Note: The API may limit name changes to twice per hour.
setperms
Example usage:Description:
Manage permissions.ini configuration from within discord.
Dev Commands
breakpoint
Example usage:Description:
This command issues a log at level CRITICAL, but does nothing else.
Can be used to manually pinpoint events in the MusicBot log file.
debug
Example usage:Description:
This command will execute arbitrary python code in the command scope.
First eval() is attempted, if exceptions are thrown exec() is tried next.
If eval is successful, it's return value is displayed.
If exec is successful, a value can be set to local variable `result` and that value will be returned.
Multi-line code can be executed if wrapped in code-block.
Otherwise only a single line may be executed.
This command may be removed in a future version, and is used by developers to debug MusicBot behaviour.
The danger of this command cannot be understated. Do not use it or give access to it if you do not understand the risks!
makeini
Example usage:Description:
Makes default INI files.
makemarkdown
Example usage:Description:
Create 'markdown' for options, permissions, or commands from the code.
The output is used to update GitHub Pages and is thus unsuitable for normal reference use.
objgraph
Example usage:Description:
Interact with objgraph, if it is installed, to gain insight into memory usage.
You can pass an arbitrary method with arguments (but no spaces!) that is a member of objgraph.
Since this method evaluates arbitrary code, it is considered dangerous like the debug command.
testready
Example usage:Description:
Command used for testing. It prints a list of commands which can be verified by a test suite.