mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Downloader] Possible solution for "partial" unload of cog in [p]cog uninstall (#3180)
* Update downloader.py * Create 3180.bugfix.rst * Rename 3180.bugfix.rst to 3179.bugfix.rst * Update redbot/cogs/downloader/downloader.py Co-Authored-By: Michael H <michael@michaelhall.tech>
This commit is contained in:
parent
335ded674e
commit
988536f96b
1
changelog.d/downloader/3179.bugfix.rst
Normal file
1
changelog.d/downloader/3179.bugfix.rst
Normal file
@ -0,0 +1 @@
|
||||
``[p]cog uninstall`` now fully unloads cog - bot will not try to load it on next startup.
|
||||
@ -647,6 +647,7 @@ class Downloader(commands.Cog):
|
||||
if poss_installed_path.exists():
|
||||
with contextlib.suppress(commands.ExtensionNotLoaded):
|
||||
ctx.bot.unload_extension(real_name)
|
||||
await ctx.bot.remove_loaded_package(real_name)
|
||||
await self._delete_cog(poss_installed_path)
|
||||
uninstalled_cogs.append(inline(real_name))
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user