MusicBot logo MusicBot

This page gives information on how to setup permissions. When you install the bot, you will get a file inside the config folder named example_permissions.ini. This option contains an example set of permissions. Edit it, and then save it as a new file called permissions.ini.

For Windows users, please note that file extensions are hidden by default, so you may just need to save the file as permissions if you are having difficulties as the .ini may be hidden.

Do not edit any configuration file using Notepad or other basic text editors, otherwise it will break. Use something like Notepad++.

The permissions file contains multiple sections. The [Default] section should not be renamed. It contains the default permissions for users of the bot that are not the owner. Each section is a group. A user’s roles do not allow them to have full permissions to use the bot, this file does.

Control what commands a group can use

Add the command in the CommandWhitelist section of the group. Each command should be separated by spaces. For example, to allow a group to use !play and !skip only:

CommandWhitelist = play skip

Add a user to a group

Add a user’s ID in the UserList section of the group. Each user ID should be separated by spaces. For example:

UserList = 154748625350688768 104766296687656960

Add a role to a group

Add a role’s ID in the GrantToRoles section of the group. Each role ID should be separated by spaces. For example:

GrantToRoles = 173129876679688192 183343083063214081

However, don’t add an ID to the Default group! This group is assigned to everyone that doesn’t have any other groups assigned and therefore needs no ID.

Available Permission Options

Show/Hide All

CommandWhitelist List of command names allowed for use, separated by spaces.
Sub-command access can be controlled by adding _ and the sub-command name.
That is `config_set` grants only the `set` sub-command of the config command.
This option overrides CommandBlacklist if set.

Default Value: (All allowed)
CommandBlacklist List of command names denied from use, separated by spaces.
Will not work if CommandWhitelist is set!
Default Value: (None denied)
AdvancedCommandLists When enabled, CommandBlacklist and CommandWhitelist are used together.
Only commands in the whitelist are allowed, however sub-commands may be denied by the blacklist.

Default Value: no
IgnoreNonVoice List of command names that can only be used while in the same voice channel as MusicBot.
Some commands will always require the user to be in voice, regardless of this list.
Command names should be separated by spaces.
Default Value: (No commands listed)
GrantToRoles List of Discord server role IDs that are granted this permission group.
This option is ignored if UserList is set.
Default Value: *empty*
UserList List of Discord member IDs that are granted permissions in this group.
This option overrides GrantToRoles.
Default Value: *empty*
MaxSongs Maximum number of songs a user is allowed to queue.
A value of 0 means unlimited.
Default Value: 8
MaxSongLength Maximum length of a song in seconds. A value of 0 means unlimited.
This permission may not be enforced if song duration is not available.
Default Value: 210
MaxPlaylistLength Maximum number of songs a playlist is allowed to have when queued.
A value of 0 means unlimited.
Default Value: 0
MaxSearchItems The maximum number of items that can be returned in a search.
Default Value: 10
AllowPlaylists Allow users to queue playlists, or multiple songs at once.
Default Value: yes
InstaSkip Allow users to skip without voting, if LegacySkip config option is enabled.
Default Value: no
SkipLooped Allows the user to skip a looped song.
Default Value: no
Remove Allows the user to remove any song from the queue.
Does not remove or skip currently playing songs.
Default Value: no
SkipWhenAbsent Skip songs added by users who are not in voice when their song is played.
Default Value: yes
BypassKaraokeMode Allows the user to add songs to the queue when Karaoke Mode is enabled.
Default Value: no
SummonNoVoice Auto summon to user voice channel when using play commands, if bot isn't in voice already.
The summon command must still be allowed for this group!
Default Value: no
Extractors Specify yt-dlp extractor names, separated by spaces, that are allowed to be used.
When empty, hard-coded defaults are used. The defaults are displayed above, but may change between versions.
To allow all extractors, add `__` without quotes to the list.

Services/extractors supported by yt-dlp are listed here:
https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md

MusicBot also provides one custom service `spotify:musicbot` to enable or disable Spotify API extraction.
NOTICE: MusicBot might not support all services available to yt-dlp!

Default Value: Bandcamp, youtube, spotify:musicbot, soundcloud, generic

Show/Hide All