mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 19:24:23 +00:00
update rest of modules to fit requirements
This commit is contained in:
@@ -31,6 +31,9 @@ class IModule(ABC):
|
||||
# Add Global Configuration to the module (Mandatory)
|
||||
self.Config = uplink.Config
|
||||
|
||||
# Add Settings to the module (Mandatory)
|
||||
self.Settings = uplink.Settings
|
||||
|
||||
# Add Base object to the module (Mandatory)
|
||||
self.Base = uplink.Base
|
||||
|
||||
@@ -46,6 +49,9 @@ class IModule(ABC):
|
||||
# Add Client object to the module (Mandatory)
|
||||
self.Client = uplink.Client
|
||||
|
||||
# Add Admin object to the module (Mandatory)
|
||||
self.Admin = uplink.Admin
|
||||
|
||||
# Add Channel object to the module (Mandatory)
|
||||
self.Channel = uplink.Channel
|
||||
|
||||
@@ -58,9 +64,6 @@ class IModule(ABC):
|
||||
# Inspect child classes
|
||||
self.inspect_class()
|
||||
|
||||
# Init the ModConfig model object.
|
||||
self.ModConfig:ModConfModel = ModConfModel()
|
||||
|
||||
self.create_tables()
|
||||
|
||||
# Sync the configuration with core configuration (Mandatory)
|
||||
|
||||
@@ -78,6 +78,7 @@ class Module:
|
||||
msg=f"[{red}MODULE ERROR{nogc}] Module {module_name} is facing issues ! {attr}",
|
||||
channel=self.__Config.SERVICE_CHANLOG
|
||||
)
|
||||
self.__Logs.error(msg=attr, exc_info=True)
|
||||
return False
|
||||
|
||||
if not hasattr(create_instance_of_the_class, 'cmd'):
|
||||
|
||||
Reference in New Issue
Block a user