Redbot 3.2.3 (2020-01-17)¶
Core Bot Changes¶
Further improvements have been made to bot startup and shutdown.
Prefixes are now cached for performance.
Added the means for cog creators to use a global preinvoke hook.
The bot now ensures it has at least the bare neccessary permissions before running commands.
Deleting instances works as intended again.
Sinbad stopped fighting it and embraced the entrypoint madness.
Core Commands¶
The servers command now also shows the ids.
Admin Cog¶
The selfrole command now has reasonable expectations about hierarchy.
Help Formatter¶
[botname]is now replaced with the bot’s display name in help text.New features added for cog creators to further customize help behavior.
Check out our command reference for details on new
format_help_for_contextmethod.
Embed settings are now consistent.
Downloader¶
Improved a few user facing messages.
Added pagination of output on cog update.
Added logging of failures.
Docs¶
There’s more detail to the below changes, so go read the docs. For some reason, documenting documentation changes is hard.
Added instructions about git version.
Clarified instructions for installation and update.
Added more details to the API key reference.
Fixed some typos and versioning mistakes.
Audio¶
Draper did things.
No seriously, Draper did things.
Wait you wanted details? Ok, I guess we can share those.
Audio properly disconnects with autodisconnect, even if notify is being used.
Symbolic links now work as intended for local tracks.
Bump play now shows the correct time till next track.
Multiple user facing messages have been made more correct.
Redbot 3.2.1 (2020-01-10)¶
Hotfixes¶
Fix Mongo conversion from being incorrectly blocked
Fix announcer not creating a message for success feedback
Log an error with creating case types rather than crash
Redbot 3.2.0 (2020-01-09)¶
Core Bot Changes¶
Breaking Changes¶
Modlog casetypes no longer have an attribute for auditlog action type. (#2897)
Removed
redbot.core.modlog.get_next_case_number(). (#2908)Removed
bank.MAX_BALANCE, usebank.get_max_balance()from now on. (#2926)The main bot config is no longer directly accessible to cogs. New methods have been added for use where this is concerned. New methods for this include
bot.get_shared_api_tokensbot.set_shared_api_tokensbot.get_embed_colorbot.get_embed_colourbot.get_admin_rolesbot.get_admin_role_idsbot.get_mod_rolesbot.get_mod_role_ids(#2967)
Reserved some command names for internal Red use. These are available programatically as
redbot.core.commands.RESERVED_COMMAND_NAMES. (#2973)Removed
bot._counter, Made a few more attrs private (cog_mgr,main_dir). (#2976)Extension’s
setup()function should no longer assume that we are, or even will be connected to Discord. This also means that cog creators should no longer usebot.wait_until_ready()inside it. (#3073)Removed the mongo driver. (#3099)
Bug Fixes¶
Help now properly hides disabled commands. (#2863)
Fixed
bot.remove_commandthrowing an error when trying to remove a non-existent command. (#2888)Command.can_seenow works as intended for disabled commands. (#2892)Modlog entries now show up properly without the mod cog loaded. (#2897)
Fixed an error in
[p]reasonwhen setting the reason for a case without a moderator. (#2908)Bank functions now check the recipient balance before transferring and stop the transfer if the recipient’s balance will go above the maximum allowed balance. (#2923)
Removed potential for additional bad API calls per ban/unban. (#2945)
The
[p]invitecommand no longer errors when a user has the bot blocked or DMs disabled in the server. (#2948)Stopped using the
:character in backup’s filename - Windows doesn’t accept it. (#2954)redbot-setup deleteno longer errors with “unexpected keyword argument”. (#2955)redbot-setup deleteno longer prompts about backup when the user passes the option--no-prompt. (#2956)Cleaned up the
[p]inviteset publicand[p]inviteset permshelp strings. (#2963)`[p]embedset usernow only affects DM’s. (#2966)Fixed an unfriendly error when the provided instance name doesn’t exist. (#2968)
Fixed the help text and response of
[p]set usebotcolorto accurately reflect what the command is doing. (#2974)Red no longer types infinitely when a command with a cooldown is called within the last second of a cooldown. (#2985)
Removed f-string usage in the launcher to prevent our error handling from causing an error. (#3002)
Fixed
MessagePredicate.greaterandMessagePredicate.lessallowing any valid int instead of only valid ints/floats that are greater/less than the given value. (#3004)Fixed an error in
[p]uptimewhen the uptime is under a second. (#3009)Added quotation marks to the response of
[p]helpset taglineso that two consecutive full stops do not appear. (#3010)Fixed an issue with clearing rules in permissions. (#3014)
Lavalink will now be restarted after an unexpected shutdown. (#3033)
Added a 3rd-party lib folder to
sys.pathbefore loading cogs. This prevents issues with 3rd-party cogs failing to load when Downloader is not loaded to install requirements. (#3036)Escaped track descriptions so that they do not break markdown. (#3047)
Red will now properly send a message when the invoked command is guild-only. (#3057)
Arguments
--co-ownerand--load-cogsnow properly require at least one argument to be passed. (#3060)Now always appends the 3rd-party lib folder to the end of
sys.pathto avoid shadowing Red’s dependencies. (#3062)Fixed
is_automod_immune’s handling of the guild check and added support for checking webhooks. (#3100)Fixed the generation of the
repos.jsonfile in the backup process. (#3114)Fixed an issue where calling audio commands when not in a voice channel could result in a crash. (#3120)
Added handling for invalid folder names in the data path gracefully in
redbot-setupandredbot --edit. (#3171)--ownerand-pcli flags now work when added from launcher. (#3174)Red will now prevent users from locking themselves out with localblacklist. (#3207)
Fixed help ending up a little too large for discord embed limits. (#3208)
Fixed formatting issues in commands that list whitelisted/blacklisted users/roles when the list is empty. (#3219)
Red will now prevent users from locking the guild owner out with localblacklist (unless the command caller is bot owner). (#3221)
Guild owners are no longer affected by the local whitelist and blacklist. (#3221)
Fixed an attribute error that can be raised in
humanize_timedeltaifseconds = 0. (#3231)Fixed
ctx.clean_prefixissues resulting from undocumented changes from discord. (#3249)redbot.core.bot.Bot.owner_idis now set in the post connection startup. (#3273)redbot.core.bot.Bot.send_to_owners()andredbot.core.bot.Bot.get_owner_notification_destinations()now wait until Red is done with post connection startup to ensure owner ID is available. (#3273)
Enhancements¶
Added the option to modify the RPC port with the
--rpc-portflag. (#2429)Slots now has a 62.5% expected payout and will not inflate economy when spammed. (#2875)
Allowed passing
clsin theredbot.core.commands.group()decorator. (#2881)Red’s Help Formatter is now considered to have a stable API. (#2892)
Modlog no longer generates cases without being told to for actions the bot did. (#2897)
Some generic modlog casetypes are now pre-registered for cog creator use. (#2897)
ModLog is now much faster at creating cases, especially in large servers. (#2908)
JSON config files are now stored without indentation, this is to reduce the file size and increase the performance of write operations. (#2921)
--[no-]backup,--[no-]drop-dband--[no-]remove-datapathin theredbot-setup deletecommand are now on/off flags. (#2958)The confirmation prompts in
redbot-setupnow have default values for user convenience. (#2958)redbot-setup deletenow has the option to leave Red’s data untouched on database backends. (#2962)Red now takes less time to fetch cases, unban members, and list warnings. (#2964)
Red now handles more things prior to connecting to discord to reduce issues during the initial load. (#3045)
bot.send_filterednow returns the message that is sent. (#3052)Red will now send a message when the invoked command is DM-only. (#3057)
All
y/nconfirmations in cli commands are now unified. (#3060)Changed
[p]infoto say “This bot is an…” instead of “This is an…” for clarity. (#3121)redbot-setupwill now use the instance name in default data paths to avoid creating a second instance with the same data path. (#3171)Instance names can now only include characters A-z, numbers, underscores, and hyphens. Old instances are unaffected by this change. (#3171)
Clarified that
[p]backupsaves the bot’s data in the help text. (#3172)Added
redbot --debuginfoflag which shows useful information for debugging. (#3183)Added the Python executable field to
[p]debuginfo. (#3184)When Red prompts for a token, it will now print a link to the guide explaining how to obtain a token. (#3204)
redbot-setupwill no longer log to disk. (#3269)redbot.core.bot.Bot.send_to_owners()andredbot.core.bot.Bot.get_owner_notification_destinations()now log when they are not able to find the owner notification destination. (#3273)The lib folder is now cleared on minor Python version changes.
[p]cog reinstallreqsin Downloader can be used to regenerate the lib folder for a new Python version. (#3274)If Red detects operating system or architecture change, it will now warn the owner about possible problems with the lib folder. (#3274)
[p]playlist downloadwill now compress playlists larger than the server attachment limit and attempt to send that. (#3279)
New Features¶
Added functions to acquire locks on Config groups and values. These locks are acquired by default when calling a value as a context manager. See
Value.get_lockfor details. (#2654)Added a config driver for PostgreSQL. (#2723)
Added methods to Config for accessing things by id without mocked objects
Config.guild_from_idConfig.user_from_idConfig.role_from_idConfig.channel_from_idConfig.member_from_ids- This one requires multiple ids, one for the guild, one for the user - Consequence of discord’s object model (#2804)
New method
humanize_numberinredbot.core.utils.chat_formattingto convert numbers into text that respects the current locale. (#2836)Added new commands to Economy
[p]bank prune user- This will delete a user’s bank account.[p]bank prune local- This will prune the bank of accounts for users who are no longer in the server.[p]bank prune global- This will prune the global bank of accounts for users who do not share any servers with the bot. (#2845)
Red now uses towncrier for changelog generation. (#2872)
Added
redbot.core.modlog.get_latest_caseto fetch the case object for the most recent ModLog case. (#2908)Added
[p]bankset maxbalto set the maximum bank balance. (#2926)Added a few methods and classes replacing direct config access (which is no longer supported)
redbot.core.Red.allowed_by_whitelist_blacklistredbot.core.Red.get_valid_prefixesredbot.core.Red.clear_shared_api_tokensredbot.core.commands.help.HelpSettings(#2976)
Added the cli flag
redbot --editwhich is used to edit the instance name, token, owner, and datapath. (#3060)Added
[p]licenseinfo. (#3090)Ensured that people can migrate from MongoDB. (#3108)
Added a command to list disabled commands globally or per guild. (#3118)
New event
on_red_api_tokens_updateis now dispatched when shared api keys for a service are updated. (#3134)Added
redbot-setup backup. (#3235)Added the method
redbot.core.bot.Bot.wait_until_red_ready()that waits until Red’s post connection startup is done. (#3273)
Removals¶
[p]set ownerand[p]set tokenhave been removed in favor of managing server side. (#2928)Shared libraries are marked for removal in Red 3.4. (#3106)
Removed
[p]backup. Use the cli commandredbot-setup backupinstead. (#3235)Removed the functions
safe_delete,fuzzy_command_search,format_fuzzy_resultsandcreate_backupfromredbot.core.utils. (#3240)Removed a lot of the launcher’s handled behavior. (#3289)
Miscellaneous changes¶
#2527, #2571, #2723, #2836, #2849, #2861, #2885, #2890, #2897, #2904, #2924, #2939, #2940, #2941, #2949, #2953, #2964, #2986, #2993, #2997, #3008, #3017, #3048, #3059, #3080, #3089, #3104, #3106, #3129, #3152, #3160, #3168, #3173, #3176, #3186, #3192, #3193, #3195, #3202, #3214, #3223, #3229, #3245, #3247, #3248, #3250, #3254, #3255, #3256, #3258, #3261, #3275, #3276, #3293, #3278, #3285, #3296,
Dependency changes¶
Documentation Changes¶
Started the user guides covering cogs and the user interface of the bot. This includes, for now, a “Getting started” guide. (#1734)
Added documentation for PM2 support. (#2105)
Updated linux install docs, adding sections for Fedora Linux, Debian/Raspbian Buster, and openSUSE. (#2558)
Created documentation covering what we consider a developer facing breaking change and the guarantees regarding them. (#2882)
Fixed the user parameter being labeled as
discord.TextChannelinstead ofdiscord.abc.Userinredbot.core.utils.predicates. (#2914)Updated towncrier info in the contribution guidelines to explain how to create a changelog for a standalone PR. (#2915)
Reworded the virtual environment guide to make it sound less scary. (#2920)
Driver docs no longer show twice. (#2972)
Added more information about
redbot.core.utils.humanize_timedeltainto the docs. (#2986)Added a direct link to the “Installing Red” section in “Installing using powershell and chocolatey”. (#2995)
Updated Git PATH install (Windows), capitalized some words, stopped mentioning the launcher. (#2998)
Added autostart documentation for Red users who installed Red inside of a virtual environment. (#3005)
Updated the Cog Creation guide with a note regarding the Develop version as well as the folder layout for local cogs. (#3021)
Added links to the getting started guide at the end of installation guides. (#3025)
Added proper docstrings to enums that show in drivers docs. (#3035)
Discord.py doc links will now always use the docs for the currently used version of discord.py. (#3053)
Added
|DPY_VERSION|substitution that will automatically get replaced by the current discord.py version. (#3053)Added missing descriptions for function returns. (#3054)
Stopped overwriting the
docs/prolog.txtfile inconf.py. (#3082)Fixed some typos and wording, added MS Azure to the host list. (#3083)
Updated the docs footer copyright to 2019. (#3105)
Added a deprecation note about shared libraries in the Downloader Framework docs. (#3106)
Updated the apikey framework documentation. Changed
bot.get_shared_api_keys()tobot.get_shared_api_tokens(). (#3110)Added information about
info.json’smin_python_versionkey in Downloader Framework docs. (#3124)Added an event reference for the
on_red_api_tokens_updateevent in the Shared API Keys docs. (#3134)Added notes explaining the best practices with config. (#3149)
Documented additional attributes in Context. (#3151)
Updated Windows docs with up to date dependency instructions. (#3188)
Added a “Publishing cogs for V3” document explaining how to make user’s cogs work with Downloader. (#3234)
Fixed broken docs for
redbot.core.commands.Context.react_quietly. (#3257)Updated copyright notices on License and RTD config to 2020. (#3259)
Added a line about setuptools and wheel. (#3262)
Ensured development builds are not advertised to the wrong audience. (#3292)
Clarified the usage intent of some of the chat formatting functions. (#3292)
Admin¶
Breaking Changes¶
Bug Fixes¶
Fixed
[p]announcefailing after encountering an error attempting to message the bot owner. (#3166)Improved the clarity of user facing messages when the user is not allowed to do something due to Discord hierarchy rules. (#3250)
Fixed some role managing commands not properly checking if Red had
manage_rolesperms before attempting to manage roles. (#3250)Fixed
[p]editrolecommands not checking if roles to be edited are higher than Red’s highest role before trying to edit them. (#3250)Fixed
[p]announce ignoreand[p]announce channelnot being able to be used by guild owners and administrators. (#3250)
Audio¶
Bug Fixes¶
[p]playlist removenow removes the playlist url if the playlist was created through[p]playlist save. (#2861)Users are no longer able to accidentally overwrite existing playlist if a new one with the same name is created/renamed. (#2861)
[p]audioset settingsno longer shows lavalink JAR version. (#2904)Fixed a
KeyError: loadTypewhen trying to play tracks. (#2904)[p]audioset settingsnow usesctx.is_owner()to check if the context author is the bot owner. (#2904)Fixed track indexs being off by 1 in
[p]search. (#2940)Fixed an issue where updating your Spotify and YouTube Data API tokens did not refresh them. (#3047)
Fixed an issue where the blacklist was not being applied correctly. (#3047)
Fixed an issue in
[p]audioset restrictions blacklist listwhere it would call the list aWhitelist. (#3047)Red’s status is now properly cleared on emptydisconnect. (#3050)
Fixed a console spam caused sometimes when auto disconnect and auto pause are used. (#3123)
Fixed an error that was thrown when running
[p]audioset dj. (#3165)Fixed a crash that could happen when the bot can’t connect to the lavalink node. (#3238)
Restricted the number of songs shown in the queue to first 500 to avoid heartbeats. (#3279)
Added more cooldowns to playlist commands and restricted the queue and playlists to 10k songs to avoid bot errors. (#3286)
Enhancements¶
[p]playlist uploadwill now load playlists generated via[p]playlist downloadmuch faster if the playlist uses the new scheme. (#2861)[p]playlistcommands now can be used by everyone regardless of DJ settings, however it will respect DJ settings when creating/modifying playlists in the server scope. (#2861)Spotify, Youtube Data, and Lavalink API calls can be cached to avoid repeated calls in the future, see
[p]audioset cache. (#2890)Playlists will now start playing as soon as first track is loaded. (#2890)
[p]audioset localpathcan set a path anywhere in your machine now. Note: This path needs to be visible byLavalink.jar. (#2904)[p]queuenow works when there are no tracks in the queue, showing the track currently playing. (#2904)[p]audioset settingsnow reports Red Lavalink version. (#2904)Adding and removing reactions in Audio is no longer a blocking action. (#2904)
When shuffle is on, queue now shows the correct play order. (#2904)
[p]seekand[p]skipcan be used by user if they are the song requester while DJ mode is enabled and votes are disabled. (#2904)Adding a playlist and an album to a saved playlist skips tracks already in the playlist. (#2904)
DJ mode is now turned off if the DJ role is deleted. (#2904)
When playing a localtrack,
[p]playand[p]bumpplayno longer require the use of the prefix “localtracks\”.Before:
[p]bumpplay localtracks\\ENM\\501 - Inside The Machine.mp3Now:[p]bumpplay ENM\\501 - Inside The Machine.mp3Now nested folders:[p]bumpplay Parent Folder\\Nested Folder\\track.mp3(#2904)Removed commas in explanations about how to set API keys. (#2905)
Expanded local track support to all file formats (m3u, m4a, mp4, etc). (#2940)
Cooldowns are now reset upon failure of commands that have a cooldown timer. (#2940)
Improved the explanation in the help string for
[p]audioset emptydisconnect. (#3051)Added a typing indicator to playlist dedupe. (#3058)
Exposed clearer errors to users in the play commands. (#3085)
Better error handling when the player is unable to play multiple tracks in the sequence. (#3165)
New Features¶
Added support for nested folders in the localtrack folder. (#270)
Now auto pauses the queue when the voice channel is empty. (#721)
All Playlist commands now accept optional arguments, use
[p]help playlist <subcommand>for more details. (#2861)[p]playlist renamewill now allow users to rename existing playlists. (#2861)[p]playlist updatewill now allow users to update non-custom Playlists to the latest available tracks. (#2861)There are now 3 different scopes of playlist. To define them, use the
--scopeargument.Global PlaylistThese playlists will be available in all servers the bot is in.
These can be managed by the Bot Owner only.
Server PlaylistThese playlists will only be available in the server they were created in.
These can be managed by the Bot Owner, Guild Owner, Mods, Admins, DJs, and the Creator (if the DJ role is disabled).
User PlaylistThese playlists will be available in all servers both the bot and the creator are in.
These can be managed by the Bot Owner and Creator only. (#2861)
[p]audioset cachecan be used to set the cache level. It’s off by default. (#2904)[p]genrecan be used to play spotify playlists. (#2904)[p]audioset cacheagecan be used to set the maximum age of an entry in the cache. Default is 365 days. (#2904)[p]audioset autoplaycan be used to enable auto play once the queue runs out. (#2904)New events dispatched by Audio.
on_red_audio_track_start(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)on_red_audio_track_end(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)on_red_audio_track_enqueue(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)on_red_audio_track_auto_play(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)on_red_audio_queue_end(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)on_red_audio_audio_disconnect(guild: discord.Guild)on_red_audio_skip_track(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)(#2904)
[p]queue shufflecan be used to shuffle the queue manually. (#2904)[p]queue clean selfcan be used to remove all songs you requested from the queue. (#2904)[p]audioset restrictionscan be used to add or remove keywords which songs must have or are not allowed to have. (#2904)[p]playlist dedupecan be used to remove duplicated tracks from a playlist. (#2904)[p]autoplaycan be used to play a random song. (#2904)[p]bumpplaycan be used to add a song to the front of the queue. (#2940)[p]shufflehas an additional argument to tell the bot whether it should shuffle bumped tracks. (#2940)Added global whitelist/blacklist commands. (#3047)
Added self-managed daily playlists in the GUILD scope, these are called “Daily playlist - YYYY-MM-DD” and auto delete after 7 days. (#3199)
CustomCom¶
Downloader¶
Bug Fixes¶
Made the regex for repo names use raw strings to stop causing a
DeprecationWarningfor invalid escape sequences. (#2571)Downloader will no longer attempt to install cogs that are already installed. (#2571)
Repo names can now only contain the characters listed in the help text (A-Z, 0-9, underscores, and hyphens). (#2827)
[p]findcogno longer attempts to find a cog for commands without a cog. (#2902)Downloader will no longer attempt to install a cog with same name as another cog that is already installed. (#2927)
Added error handling for when a remote repository or branch is deleted, now notifies the which repository failed and continues to update the others. (#2936)
[p]cog installwill no longer error if a cog has an empty install message. (#3024)Made
redbot.cogs.downloader.repo_manager.Repo.clean_urlwork with relative urls. This property isstrtype now. (#3141)Fixed an error on repo add from empty string values for the
install_msginfo.json field. (#3153)Disabled all git auth prompts when adding/updating a repo with Downloader. (#3159)
[p]findcognow properly works for cogs with less typical folder structure. (#3177)[p]cog uninstallnow fully unloads cog - the bot will not try to load it on next startup. (#3179)
Enhancements¶
Downloader will now check if the Python and bot versions match requirements in
info.jsonduring update. (#1866)[p]cog installnow accepts multiple cog names. (#2527)When passing cogs to
[p]cog update, it will now only update those cogs, not all cogs from the repo those cogs are from. (#2527)Added error messages for failures when installing/reinstalling requirements and copying cogs and shared libraries. (#2571)
[p]findcognow uses sanitized urls (without HTTP Basic Auth fragments). (#3129)[p]repo infowill now show the repo’s url, branch, and authors. (#3225)[p]cog infowill now show cog authors. (#3225)[p]findcogwill now show the repo’s branch. (#3225)
New Features¶
Added
[p]repo update [repos]which updates repos without updating the cogs from them. (#2527)Added
[p]cog installversion <repo_name> <revision> <cogs>which installs cogs from a specified revision (commit, tag) of the given repo. When using this command, the cog will automatically be pinned. (#2527)Added
[p]cog pin <cogs>and[p]cog unpin <cogs>for pinning cogs. Cogs that are pinned will not be updated when using update commands. (#2527)Added
[p]cog checkforupdatesthat lists which cogs can be updated (including pinned cog) without updating them. (#2527)Added
[p]cog updateallfromrepos <repos>that updates all cogs from the given repos. (#2527)Added
[p]cog updatetoversion <repo_name> <revision> [cogs]that updates all cogs or ones of user’s choosing to chosen revision of the given repo. (#2527)Added
[p]cog reinstallreqsthat reinstalls cog requirements and shared libraries for all installed cogs. (#3167)
Image¶
Permissions¶
Trivia¶
Bug Fixes¶
Fixed a typo in Ahsoka Tano’s name in the Starwars trivia list. (#2909)
Fixed a bug where
[p]trivia leaderboardfailed to run. (#2911)Fixed a typo in the Greek mythology trivia list regarding Hermes’ staff. (#2994)
Fixed a question in the Overwatch trivia list that accepted blank responses. (#2996)
Fixed questions and answers that were incorrect in the Clash Royale trivia list. (#3236)