mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Stop reloading unrelated modules (#4958)
This commit is contained in:
parent
7459af25ba
commit
2f7376169e
@ -240,7 +240,11 @@ class CoreLogic:
|
|||||||
for m in modules:
|
for m in modules:
|
||||||
maybe_reload(m)
|
maybe_reload(m)
|
||||||
|
|
||||||
children = {name: lib for name, lib in sys.modules.items() if name.startswith(module_name)}
|
children = {
|
||||||
|
name: lib
|
||||||
|
for name, lib in sys.modules.items()
|
||||||
|
if name == module_name or name.startswith(f"{module_name}.")
|
||||||
|
}
|
||||||
for child_name, lib in children.items():
|
for child_name, lib in children.items():
|
||||||
importlib._bootstrap._exec(lib.__spec__, lib)
|
importlib._bootstrap._exec(lib.__spec__, lib)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user