From f41515a7399ece636c1337cc80bf46c191efe99f Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 6 Aug 2023 17:53:32 +0200 Subject: [PATCH] Removed old settings #127 --- .../boot_log/configuration/__init__.py | 26 ------------------- .../configuration/boot_log_server_settings.py | 17 ------------ .../configuration/boot_log_settings.py | 21 --------------- .../permission/configuration/__init__.py | 26 ------------------- .../permission_server_settings.py | 22 ---------------- .../configuration/permission_settings.py | 21 --------------- 6 files changed, 133 deletions(-) delete mode 100644 kdb-bot/src/modules/boot_log/configuration/__init__.py delete mode 100644 kdb-bot/src/modules/boot_log/configuration/boot_log_server_settings.py delete mode 100644 kdb-bot/src/modules/boot_log/configuration/boot_log_settings.py delete mode 100644 kdb-bot/src/modules/permission/configuration/__init__.py delete mode 100644 kdb-bot/src/modules/permission/configuration/permission_server_settings.py delete mode 100644 kdb-bot/src/modules/permission/configuration/permission_settings.py diff --git a/kdb-bot/src/modules/boot_log/configuration/__init__.py b/kdb-bot/src/modules/boot_log/configuration/__init__.py deleted file mode 100644 index cdde1580..00000000 --- a/kdb-bot/src/modules/boot_log/configuration/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -bot Keksdose bot -~~~~~~~~~~~~~~~~~~~ - -Discord bot for the Keksdose discord Server - -:copyright: (c) 2022 - 2023 sh-edraft.de -:license: MIT, see LICENSE for more details. - -""" - -__title__ = "modules.boot_log.configuration" -__author__ = "Sven Heidemann" -__license__ = "MIT" -__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.0.7" - -from collections import namedtuple - - -# imports: - -VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="0", micro="7") diff --git a/kdb-bot/src/modules/boot_log/configuration/boot_log_server_settings.py b/kdb-bot/src/modules/boot_log/configuration/boot_log_server_settings.py deleted file mode 100644 index f7e050ef..00000000 --- a/kdb-bot/src/modules/boot_log/configuration/boot_log_server_settings.py +++ /dev/null @@ -1,17 +0,0 @@ -from cpl_core.configuration.configuration_model_abc import ConfigurationModelABC - - -class BootLogServerSettings(ConfigurationModelABC): - def __init__(self, id: int = None, login_message_channel_id: int = None): - ConfigurationModelABC.__init__(self) - - self._id: int = 0 if id is None else id - self._login_message_channel_id: int = 0 if login_message_channel_id is None else login_message_channel_id - - @property - def id(self) -> int: - return self._id - - @property - def login_message_channel_id(self) -> int: - return self._login_message_channel_id diff --git a/kdb-bot/src/modules/boot_log/configuration/boot_log_settings.py b/kdb-bot/src/modules/boot_log/configuration/boot_log_settings.py deleted file mode 100644 index 415d5899..00000000 --- a/kdb-bot/src/modules/boot_log/configuration/boot_log_settings.py +++ /dev/null @@ -1,21 +0,0 @@ -from cpl_core.configuration.configuration_model_abc import ConfigurationModelABC -from cpl_core.utils.json_processor import JSONProcessor -from cpl_query.extension import List - -from modules.boot_log.configuration.boot_log_server_settings import ( - BootLogServerSettings, -) - - -class BootLogSettings(ConfigurationModelABC): - def __init__(self, **kwargs: dict): - ConfigurationModelABC.__init__(self) - - self._servers: List[BootLogServerSettings] = List() - for s in kwargs: - kwargs[s]["Id"] = s - self._servers.append(JSONProcessor.process(BootLogServerSettings, kwargs[s])) - - @property - def servers(self) -> List[BootLogServerSettings]: - return self._servers diff --git a/kdb-bot/src/modules/permission/configuration/__init__.py b/kdb-bot/src/modules/permission/configuration/__init__.py deleted file mode 100644 index 60e3d7f5..00000000 --- a/kdb-bot/src/modules/permission/configuration/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -bot Keksdose bot -~~~~~~~~~~~~~~~~~~~ - -Discord bot for the Keksdose discord Server - -:copyright: (c) 2022 - 2023 sh-edraft.de -:license: MIT, see LICENSE for more details. - -""" - -__title__ = "modules.permission.configuration" -__author__ = "Sven Heidemann" -__license__ = "MIT" -__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.0.7" - -from collections import namedtuple - - -# imports - -VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="0", micro="7") diff --git a/kdb-bot/src/modules/permission/configuration/permission_server_settings.py b/kdb-bot/src/modules/permission/configuration/permission_server_settings.py deleted file mode 100644 index 6e928f36..00000000 --- a/kdb-bot/src/modules/permission/configuration/permission_server_settings.py +++ /dev/null @@ -1,22 +0,0 @@ -from cpl_core.configuration.configuration_model_abc import ConfigurationModelABC - - -class PermissionServerSettings(ConfigurationModelABC): - def __init__(self, id: int = None, admin_role_ids: list = None, moderator_role_ids: list = None): - ConfigurationModelABC.__init__(self) - - self._id: int = 0 if id is None else id - self._admin_roles: list[int] = [] if admin_role_ids is None else admin_role_ids - self._moderator_roles: list[int] = [] if moderator_role_ids is None else moderator_role_ids - - @property - def id(self) -> int: - return self._id - - @property - def admin_roles(self) -> list[int]: - return self._admin_roles - - @property - def moderator_roles(self) -> list[int]: - return self._moderator_roles diff --git a/kdb-bot/src/modules/permission/configuration/permission_settings.py b/kdb-bot/src/modules/permission/configuration/permission_settings.py deleted file mode 100644 index 8ce4ad7b..00000000 --- a/kdb-bot/src/modules/permission/configuration/permission_settings.py +++ /dev/null @@ -1,21 +0,0 @@ -from cpl_core.configuration.configuration_model_abc import ConfigurationModelABC -from cpl_core.utils.json_processor import JSONProcessor -from cpl_query.extension import List - -from modules.permission.configuration.permission_server_settings import ( - PermissionServerSettings, -) - - -class PermissionSettings(ConfigurationModelABC): - def __init__(self, **kwargs: dict): - ConfigurationModelABC.__init__(self) - - self._servers: List[PermissionServerSettings] = List() - for s in kwargs: - kwargs[s]["Id"] = s - self._servers.append(JSONProcessor.process(PermissionServerSettings, kwargs[s])) - - @property - def servers(self) -> List[PermissionServerSettings]: - return self._servers