mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
Update root __init__.py:
- Force reload of all command modules - Remove modules from sys.modules before importing - Reload utils module after importing - Ensure proper exception imports
This commit is contained in:
@@ -7,11 +7,16 @@ import importlib
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
|
||||||
# Remove modules to force reload
|
# Force reload of all modules
|
||||||
modules_to_reload = [
|
modules_to_reload = [
|
||||||
'videoarchiver.utils.exceptions',
|
'videoarchiver.utils.exceptions',
|
||||||
'videoarchiver.utils'
|
'videoarchiver.utils',
|
||||||
|
'videoarchiver.core.commands.settings_commands',
|
||||||
|
'videoarchiver.core.commands.archiver_commands',
|
||||||
|
'videoarchiver.core.commands.database_commands'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Remove modules to force fresh import
|
||||||
for module in modules_to_reload:
|
for module in modules_to_reload:
|
||||||
if module in sys.modules:
|
if module in sys.modules:
|
||||||
del sys.modules[module]
|
del sys.modules[module]
|
||||||
|
|||||||
Reference in New Issue
Block a user