These are the latest changes to the MusicBot. Please check this page after bot updates to see what has changed. To learn how to update your bot, see this page.
26th May 2024
May 26, 2024 major
Noticable Changes
This covers major changes in the newly added dev
branch as well as the review
branch. The entire player backend has had a major overhaul, courtesy of ItsTheFae many bugs have been squashed, new features, commands, and options have been added. The last changelog update was 3 years ago. For an entire list of changes it’s best to view the commits.
Options:
- The bot being deafened in a VC has been made optional.
- Adds the option to have the bot leave for various situations: after x time, when queue is empty, and if the bot is paused for x time.
- Adds an option to set a default playback speed.
- Storage options:
- Adds the option to limit storage by size. (eg: 8GB)
- Adds the option to only keep files that have been used in the last x amount of time.
- Adds the option to keep autoplaylist files in cache while other storage options are set.
- Adds the option to use commands by mentions (eg: @bot play song)
- Adds the option to set a custom status message, and provides variables to use dynamically.
- Adds the option to set a prefix per guild.
- Adds a round robin option.
- Adds the option to enable or disable user block list.
- Adds the option to enable or disable song block list.
- Adds the option to enable a network checker. Mostly used for bots being ran 24/7.
- Adds the option to save all songs played with the bot to a global playlist, history.txt
- Adds an option to save this per guild, history-{Guild_ID}.txt.
- Adds an option to play local media from the local MediaFileDirectory path.
play file://path/to/file.ext
- Adds the option to automatically unpause the bot when play commands are used.
Files:
- Adds an option to keep a max amount of logs.
- Adds an option to set the format used for logs.
- Adds an option to set a folder path for audio_cache.
- Adds an option to set a file path for user block list and song block list.
- Adds an option to set a directory path for the auto playlist.
- Adds an option to set a directory path for local media.
New commands:
- Loop commands.
- Loop the current song or the entire playlist.
- Move command.
- Move a song from a spot in the queue to a new spot in queue. (eg:
move 5 2
)
- Move a song from a spot in the queue to a new spot in queue. (eg:
- Autoplaylist command.
- Adds a command for autoplaylist manipulation. You can add songs to the autoplaylist, remove songs, show a list of avaiable playlist, or set a playlist for a guild.
- Shuffeplay command.
- Adds a command to playback a playlist shuffled. Like turning shuffle on spotify and then pressing play.
- Blockuser command.
- Adds a user to the block list.
- Replaces blacklist
- Blocksong command.
- Adds a song to the block list.
- Botlatency command.
- Display current latency between bot and discord. Will also show voice latencies.
- Latency command.
- User version of botlatency.
- Cache command.
- Show current cache storage info.
- Clear cache.
- Checkupdates command.
- Shows current bot version and updates available to the bot or packages.
- Config command.
- Change config options on the fly.
- Permissions command.
- Change config permissions on the fly.
- Follow command.
- Will follow the command issuer around a guild when moving channels.
- Owner can specify who to follow.
- Restart sub commands.
- Adds new sub commands to restart.
- soft will reload the config without reloading the source code.
- full will restart and reload configs and source code.
- uppip will attempt to update pip packages and then fully restart.
- upgit will attempt to upgrade the bot and then fully restart.
- upgrade will attempt to upgrade the bot and packages then fully restart.
- Setprefix command.
- Set the prefix for the guild.
- Seek command.
- Seek to a certain spot in the song
- Speed command.
- Adjust the current playback speed.
- Uptime command.
- Display how long the bot has been actively connected to discord session. This is per startup so a restart full will reset this.
- Setperms command.
-
setperms list show loaded groups and list permission options.
-
setperms reload reloads permissions from the permissions.ini file.
-
setperms add [GroupName] add new group with defaults.
-
setperms remove [GroupName] remove existing group.
-
setperms help [PermName] show help text for the permission option.
-
setperms show [GroupName] [PermName] show permission value for given group and permission.
-
setperms save [GroupName] save permissions group to file.
-
setperms set [GroupName] [PermName] [Value] set permission value for the group.
-
Bug fixes:
- Fixed a bug where the summon message would display even if the bot was already in a vc.
- Fixed the restart command.
- Fixed Spotify not being able to use credentials.
- Fixed bot crashing on restart when using spotify secret and ID.
- Fixed permissions not being disabled when leaving GrantToRoles or UserList empty.
- Fixed spelling mistakes in en.json.
- Fixed a bug where when using the option command to enable autoplaylist the currently playing song would get skipped.
- Fixed a bug where messages would get deleted even when set not to.
- Fixed a bug where invoking commands would get deleted even when set not to.
- Fixed a bug where stage channels where being recoginized as text channels.
- Also adds support for playing musing in stage channels.
- Remove checks for request package.
- These checks where causing an issue due to the request package being used internally in one of the other packages. Leaving the bot unusable.
- Fixed a bug where now playing messages weren’t respecting the
DeleteNowPlaying
option. - Automatic fix using certifi when local SSL store is missing certs.
- Fixed an error when timer options are missing and default int is used.
- Fixed file section not being validated.
- Fixed a bug where missing logs would halt startup.
- Fixed a index bug with new round robin option.
- Fixed skip command not tallying votes properly.
- The
blockuser
command has been updated to accept ID’s so you don’t have to mention someone to block them from using the bot. stream
command can now be applied to non stream entries.
Overhauls:
- ffmpeg and ffmprobe executable files have been updates to essential builds.
- The player has been overhauled to be easier to read, and be more effectient. The changes are massive.
- The player will now make less calls to extract_info.
- Autoplaylist songs are now skipped when a user queues a song.
- Complete overhaul of ytdl information extraction and several player commands, performance focused.
- Updates
shuffleplay
to shuffle playlist entries before they are queued. - Adds playlist name and other details to pldump generated files.
- Enable pldump command to send file to invoking channel if DM fails.
- Updates Now Playing Status to use custom status and activity (experimental).
- Adds stream support to autoplaylist entries, if they are detected as a stream.
- Adds stream support to regular play command, if input is detected as a stream.
- Adds playlist link support to autoplaylist entries. (experimental)
- Asks if user wants to queue the playlist when using links with playlist and video IDs.
- Include thumbnail in now-playing for any tracks that have it.
- Remove all extraneous calls to extract_info, and carry extracted info with entries.
- Rebuild of Spotify API to make it faster to enqueue Spotify playlists and albums.
- Updates
- Restart and shutdown has been cleaned up to properly clean pending task.
- Autopause logic has been cleaned up to make it easier to read.
- Removes shlex from the search command, search engines now handle quotes directly.
- Fixes possible issues with counting members in channel not respecting bot exceptions.
- Updates ConfigParser to provide extra parser methods rather than relying on validation later.
- Updates Permissions to also use extended ConfigParser methods, for consistency.
- Refactored the decorator methods to live in utils.py or be removed.
- Majority of function definitions now have some kind of docstring.
- Playing compound links now works better and does not double-queue the carrier video.
- Add actual command-line arguments to control logging, show version, and skip startup checks.
- Supported CLI flags: -V to print version and exit. –help or -h for standard help / usage. –no-checks Legacy option to skip startup checks. –logs-kept Set the number of logs to keep when rotating logs. –log-level Set an override to DebugLevel in config/options.ini file. –log-rotate-fmt Set a filename component using strftime() compatible string.
- Update the
queue
command to add pagination by both command arg and reactions. - Allow
listids
andperms
commands to fall back to sending in public if DM fails. - Improved security of subprocess command execution, to reduce command/shell injection risks.
- Adds logic to check for updates to MusicBot via git and for dependencies via pip.
- Adds new command checkupdates to print status about available updates.
- Adds new command botversion to print bot current version, as reported by git.
- Adds new CLI flag –no-update-check to disable checking for updates on startup.
- Adds new CLI flag –no-install-deps to disable automatic install of dependencies when ImportError happens.
- Further updates to start-up to (hopefully) gracefully fail and install dependencies.
- Changes on_ready event to call status update and join channels after the event.
- Changes to player/voice handling to (hopefully) prevent dead players.
- Adds re-try logic to get_player to (hopefully) deal with initial connection failures.
- Auto playlist had some refinements in entry extraction and error handling.
- All launcher files run.sh and run.bat now pass CLI arguments to python.
- Adds bootleg Voice connection resume from network outages.
- Uses discord.py library reconnect logic for back-off retry, can be slow after long outages.
- Uses custom retry logic to attempt connection multiple times before failing.
- Detects network outage and automatically pauses or resumes player.
- Fix logging on Windows so module names are not
placeholder. - Adds an offline status update to logout/shutdown process.
- Adds playback progress to saved queue, and starts playback at the saved position.
- Update run.sh python detection to account for name conventions between distros.
- Update update.sh python detection to the same as in run.sh.
- Improve and test various aspects of Install and Update scripts.
- All installers now ask before proceeding to install packages.
- Linux install.sh now supports –list flag to show possible supported distros.
- Linux install.sh improved detection of python with correct version.
- Linux install.sh now requires User and Group to set up system service.
- Windows installer adds FFmpeg install step to install.ps1 via winget tool.
- Linux distro support updates:
- Drop support of CentOS 6 as end-of-life.
- Adds support for CentOS Stream 8.
- Adds CentOS 7, tested despite EOL date being June 2024.
- Drop support of Ubuntu versions before 18.04.
- Tested Ubuntu 18.04, 20.04, and 22.04 installer.
- Adds support for Pop! OS, tested with 22.04 (20.04 is not tested but may work)
- Tested Arch Linux (2024.03.01), with venv install.
- Adds support for Debian 12, with venv install.
- Tested Debian 11.3 installation.
- Tested Raspberry Pi OS (Desktop i386, reported as Debian 11).
- Added new
install.ps1
script. - The
np
command now makes use of embeds if set to.
Final Notes: All changes may not be documented here and it’s in your best interest to look at commits on the repo if you want more in depth explanation of the changes made recently.
15th December 2021
December 15, 2021 major
Review merge
This release merges all changes from the review
branch of MusicBot into the main branch. This contains multiple bug fixes, improvements, and changes. MusicBot requires Python 3.8 or higher.
Important: Discord gateway intents
Please note that MusicBot requires privileged intents to function. You need to enable each of the Gateway Intents on your Discord Application’s ‘Bot’ page.
Changes:
- ⚡️ Switched from
discord.py
topycord
fork, which is maintained. - ⚡️ Switched from
youtube-dl
toyt-dlp
fork, which is maintained. - Add example
docker-compose.yml
file for Docker deployment. - Bot will deafen itself if it has permission.
- Fix for Soundcloud sets.
- A lot of cleanup and changes for underlying code, fixing a myriad of issues.
26th August 2019
August 26, 2019 minor
- Fix bug related to deleting entries
- Suppress no PATH warning and run with –user flag when using pip with update script
- Messages from bots are now ignored, exceptions can be added in the config file
- Fix bug preventing playing playlists that contain some bad entries
- Bots and inactive users in voice channels are now ignored for the sake of autopause
- !perms command now also accepts a user’s name or ID
- Displayed version number for the bot now consists of the latest Git tag, commits since that tag, and the last commit hash
12th May 2019
May 12, 2019 minor
- Discard any query arguments from Spotify URIs before we contact Spotify’s API
- Fix a bug with the bot’s now playing counter not updating
- ffmpeg binaries have been updated from
20180307-5ab0ecf
->20190505-e384f6f
- New option added to allow the bot to message users when their song is being played instead of sending a message to a channel
- New option added to disable now playing messages for automatic entries
- Pass globals to debug command
- Fix an issue where the volume was not updating until a song finished
- Adjusted a check in on_message
26th April 2019
April 26, 2019 minor
New versioning approach:
From now on, MusicBot versions will use the date of the release to the master
branch (shown as release-DDMMYY
when running the bot), and not an arbitrary version number. This change is because it makes it easier to see how old the version is that a user is using, and because the old versioning was fairly nonsensical.
Changes:
- Add Taiwan (tradiitonal Chinese) translation file
- Change discord.py definition in requirements.txt to use PyPI version
- Stop the bot from throwing summon error on voice state update
- Fix “module ‘aiohttp’ has no attribute ‘Timeout’” raised when queueing unrecognized source using the play command
- Add Spanish translation file
- Add Swedish translation file
- Added now playing message for automatic entries
- Fix Bandcamp album issue
- Fix an issue where the now playing message was not deleted after a song ended
1.9.8_4
January 29, 2019 minor
- Add Russian translation file
- Fixes for blank strings in command arguments
- Implement command alias feature
- Fix an issue with the Docker entrypoint not updating Python dependencies
- Ensure we’re in the bot directory for run and update scripts
- Correctly list servers in server_names.txt
1.9.8_3
December 14, 2018 minor
- Fix a “You don’t have permission to use that command” issue
- Better checks for if the player is dead or paused
- Fix an issue where the player would stop despite remaining entries
1.9.8_2
December 06, 2018 minor
- Fix parts of Python path which contain spaces turns into args in the update script
- Fix loading persistent queues that are saved prior the rewrite
- BindtoChannels and AutojoinChannels ids can now be separated with only a single comma
- Transform and remove remnants of pre-rewrite code
- Fixed a permission bug that escaped from sight because we turn owner_id into integer too late
- Fall back to old behavior when there are no owner perms in the permissions file
- Attempt to eradicate the ‘voice being None’ bug
- on_server_unavailable -> on_guild_unavailable
- More band-aid fixes for owner permissions
- Improve Docker build process with new entrypoint and Travis CI config
- Added checking for msg.author.voice as it can be None
- Option to check if owner is in a server and leave if they’re not
- Improvements to the bash scripts
- Added Thai translation file
- Allow servers without bound channels
- Use /tracks endpoint for all Spotify playlists
- Add youtube:playlist to example permissions extractors
1.9.8_1
August 27, 2018 minor
- Fixed typo when processing Spotify playlists
- Added shebangs to run.py and update.py
1.9.8
August 18, 2018 major
discord.py rewrite
Starting from version 1.9.8, MusicBot requires the rewrite version of discord.py. It can be installed using the update files included, or by running python3 -m pip install -U -r requirements.txt
.
Non-extensive list of changes:
- A fallback will be used if an i18n file cannot be parsed
- The save command now allows passing a custom URL
- Additional error handling has been added for experimental EQ
- Allow skipping bot update (but updating dependencies) when running the update script
LegacySkip
has been added as an option for those who prefer old skip behaviour- Experimental EQ handling will now happen asynchronously
- Experimental EQ handling will take place after a track is downloaded, rather than before playing, to allow processing while the bot is playing other media
- A max search limit has been added to permissions
- Additional error handling has been added for Spotify
open.spotify.com
URLs are now supported- Experimental EQ will no longer be enabled by default
- Changes have been made to the Dockerfile to allow it to work again
- discord.py now handles websocket reconnects and other issues, hopefully reducing the bot’s random disconnects
- Fixed streams using the wrong options for ffmpeg
- Large Spotify playlists will now be handled properly
- Fix an issue with setting the bot’s avatar
Translations have been contributed (thanks!):
- Japanese
- Korean
1.9.7
March 10, 2018 major
Spotify URIs
The bot can now handle Spotify URIs, aka URIs that begin with spotify:
. This can be used to add an album or playlist from Spotify to the bot, however, as streaming direct from Spotify is against their Terms of Service, the bot tries to find the nearest match for the song(s) on YouTube instead.
Important:
- Update scripts have been renamed. Use
python update.py
to run it, or the platform-specific update scripts. - The restart command has been changed and now works correctly, but will not “hard restart” your entire bot or refresh the configuration.
- If you use the
UseEmbeds
option in the config, embed-style responses will be used for the bot. - Owners, or those that can instaskip songs, must use
!skip f
to do so.
Changes:
- Docker support has been fixed.
- Internationalization support.
- Shell script for updating dependencies should use the correct Py version
- Help command should use the correct URL to this repository
- Added continuous integration tests
- blacklist.txt and whitelist.txt are now created when the bot runs
- New config option to write current song to file
- New config option to change autoplaylist order
- Improved how the autoplaylist actually plays, no more dupes three times in a row
- A .netrc will be used with yt*dl if present on the user’s machine
- The config file has been reworded and cleaned up
- A new command has been added to enable and disable various options for the bot’s session
- Run script for Linux and Mac has been merged
- Shell scripts are now executable by default
- Times printed by the bot that did not have leading zeroes before will now have leading zeroes
- A permission has been added for allowing the person to skip their own songs
/watch?=xxx&list=xxx URLs
will now be parsed as playlists- A command has been added allowing you to remove a song from a position in queue
- The readme has been updated
- Autoplaylists are handled internally on a per-server basis reading from the same file
- Karaoke mode has been added
- An experimental version of equalization has been added to the bot, must be enabled in config
- Users can now be mentioned when using perms command to get their perms
- A command has been added allowing you to force the bot to leave a server
- The bot will now correctly pause itself in a number of circumstances with autopause enabled
- A whitelist has been added for yt-dl extractors/services in the perms file
- A progress bar has been added to the
np
command
1.9.6_1
December 30, 2017 minor
This is a small update to address some issues.
Fixes
- Prevent user from bypassing limits using a race condition by spamming the play command (#1172)
- Fix an issue where using setavatar with no parameters would result in an unhelpful error (#1041)
- Attempt to stream
text/html
content-types when using the play command (#1030) - Added explicit
type
parameter forchange_presence
calls (#1360) - Fix an issue where forward slashes when using the play command would return nothing (#649 #757)
- Fix an issue where the skip ratio was not being implemented correctly (#979 #1012)
- README now links to the correct places (#946)
- A typo in the
SaveVideos
config option explanation has been fixed (#1430)
Changes
- The autoplaylist will now play through each song once before starting again, as opposed to picking randomly from the list. This should resolve issues with it playing the same song regularly (#964)
- The binaries for ffmpeg have been updated to version
20171229-0c78b6a
- The README has been reworded and updated
- The search command now uses reactions to navigate between results
- The bot no longer supports authenticating via an email/pass login flow. You should create an actual bot application instead, using the
bot
scope, and provide the bot user’s token in the config file. Our FAQ provides steps for this. - The message printed when connected to Discord displaying the bot’s version is instead printed before the connection to Discord for the purpose of future troubleshooting.
Additions
- New
save
command which will save the current song to the autoplaylist (#215 #88 #1196 #1010 #615) - The bot can now have a custom “now playing” status using the
StatusMessage
config option - Added a new sanity check (see below).
- Some files for GitHub (e.g contribution guidelines and issue templates) have been added for consistency.
- The bot’s version should be printed as the command window title on some systems (e.g Windows).
This version, and future versions of the bot, will require you to use Git to install the bot. This has been done so that people can’t download the ZIP file and then complain when the bot doesn’t work, or when people say that they followed a YouTube tutorial which is outdated by like a year. Our official guides go through the steps of installing Git, and if you don’t bother following them, we’re not going to help you.
Trust me, using Git is a lot better idea than downloading a ZIP, as easy as it sounds, because otherwise your process of updating the bot will be made much harder and long-winded. If you’ve already installed the bot properly, great! You can update easily by looking at this page.
1.9.6
November 29, 2017 major
This is a courtesy release to merge commits from the review branch into master that have been on that branch for a long time. There are a lot of things that have changed code-wise, but the end user functionality generally remains the same.
Notable changes
For a definitive list of changes, view the commits.
- Support for streaming (
!stream
) has been added, but may be buggy - use at your own risk - The bot allows Python 3.6 and later versions to run it - not guaranteed to work
- A lot of code has been cleaned up and/or rewritten
- Additional sanity checks have been added
- The bot now uses the
logging
module rather than printing to stdout normally, also usescolorlog
- Voice code has been improved
- Autopausing has been improved
- Dev commands have been added, dev IDs can be added in config
- Fixed several issues, including one when trying to run the bot using recent discord.py versions
Notes
With this release, a LICENSE file has been added to the repo. While we’ve always stated that this bot as being under the MIT license, we’ve now made this known properly.
Please avoid downloading the ZIP of this release unless absolutely necessary. Follow the guides on the wiki to learn how to install the bot instead, or if you’ve already installed it, update the bot.
1.9.5_2
June 29, 2016 minor
Small update to address a few issues. I was going to release this with the next major update but i’m going to push this much now to fix a few things.
Fixes
- Fixed
requirements.txt
entries (discord.py, cffi) - The restart loop now only happens after a certain point during the bot startup sequence
- Updated comments in example configs
Additions
- If the bot is a
Bot
account, it will display the invite url in the console if the bot is not in any servers on startup - Songs can now be skipped by whomever queued them.
1.9.5_1
June 13, 2016 minor
Assorted fixes and minor updates and such.
Fixes:
- Fixed channel id resolving on startup
- Fixed voice channel not updating internally when the bot is moved
- Fixed error introduced by discord.py update
- Fixed docker thing maybe?
Changes:
- The
joinserver
command now generates the oauth url required to invite the bot if the bot is on abot
account - The
update_deps
script now requests admin to run - The opus dlls have been removed since they now come with discord.py
- Errors are printed in a few more situations
- Updated various comments