diff options
| -rw-r--r-- | discord/ext/commands/bot.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 85b8d134..34ab30e2 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -768,6 +768,9 @@ class BotBase(GroupMixin): del lib del self.extensions[name] del sys.modules[name] + for module in list(sys.modules.keys()): + if _is_submodule(lib_name, module): + del sys.modules[module] # command processing |