#127_config_in_wi #327

Merged
edraft merged 16 commits from #127_config_in_wi into 1.1.0 2023-08-14 19:08:22 +02:00
6 changed files with 0 additions and 133 deletions
Showing only changes of commit f41515a739 - Show all commits

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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