Skip to content

Commit 0377176

Browse files
committed
Merge branch 'development' of https://github.com/kyb3r/modmail; branch 'patch-03' of git://github.com/Jerrie-Aries/modmail into Jerrie-Aries-patch-03
2 parents ebcfe4e + fbb45e3 commit 0377176

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cogs/plugins.py

+8
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,15 @@ async def plugins_reset(self, ctx):
528528
self.bot.unload_extension(ext)
529529
except Exception:
530530
logger.error("Failed to unload plugin: %s.", ext)
531+
else:
532+
if not self.loaded_plugins:
533+
continue
534+
plugin = next((p for p in self.loaded_plugins if p.ext_string == ext), None)
535+
if plugin:
536+
self.loaded_plugins.remove(plugin)
537+
531538
self.bot.config["plugins"].clear()
539+
await self.bot.config.update()
532540

533541
cache_path = Path(__file__).absolute().parent.parent / "temp" / "plugins-cache"
534542
if cache_path.exists():

0 commit comments

Comments
 (0)