Updating cmd by handling all functions, Threads and timers and schemas in separate files. code should be clear

This commit is contained in:
adator
2025-08-09 03:35:30 +02:00
parent 0a655b2df0
commit 9ea5ae50d5
12 changed files with 1053 additions and 963 deletions

View File

@@ -616,10 +616,13 @@ class Irc:
module_folder = module_name.split('_')[1].lower() # ==> defender
class_name = module_name.split('_')[1].capitalize() # ==> Defender
if 'mods.' + module_name in sys.modules:
if f'mods.{module_folder}.{module_name}' in sys.modules:
self.Logs.info('Unload the module ...')
self.loaded_classes[class_name].unload()
self.Logs.info('Module Already Loaded ... reloading the module ...')
# Load dependencies
self.Base.reload_modules_with_dependencies(f'mods.{module_folder}')
the_module = sys.modules[f'mods.{module_folder}.{module_name}']
importlib.reload(the_module)
@@ -683,7 +686,7 @@ class Irc:
if self.User.get_User(uid) is None:
return None
getUser = self.User.get_User_AsDict(uid)
getUser = self.User.get_user_asdict(uid)
level = int(level)