Merge pull request '1.1.0.rc2' (#342) from 1.1.0.rc2 into 1.1.0

Reviewed-on: sh-edraft.de/kd_discord_bot#342
Reviewed-by: edraft-dev <dev.sven.heidemann@sh-edraft.de>
This commit is contained in:
Sven Heidemann 2023-08-16 19:09:04 +02:00
commit f5b2bec356
103 changed files with 218 additions and 182 deletions

View File

@ -15,7 +15,7 @@ __title__ = "bot"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -71,7 +71,7 @@ class Application(DiscordBotApplicationABC):
self._api.stop() self._api.stop()
await self._bot.close() await self._bot.close()
self._data_integrity.check_data_integrity(is_for_shutdown=True) await self._data_integrity.check_data_integrity(is_for_shutdown=True)
self._logger.info(__name__, f"Stopped {DiscordBotService.__name__}") self._logger.info(__name__, f"Stopped {DiscordBotService.__name__}")
except Exception as e: except Exception as e:
self._logger.error(__name__, "stop failed", e) self._logger.error(__name__, "stop failed", e)

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -15,7 +15,7 @@ __title__ = "bot.extension"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.abc"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "", "Author": "",
"AuthorEmail": "", "AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.configuration"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.controller"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.event"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.exception"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.filter"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.filter.discord"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.logging"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.model"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.model.discord"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.route"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.service"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_api.transformer"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.abc"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.configuration"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.core_extension"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.events"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.exception"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.helper"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.logging"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.pipes"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_core.service"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -363,7 +363,7 @@ class DataIntegrityService:
except Exception as e: except Exception as e:
self._logger.error(__name__, f"Cannot get UserJoinedGameServer", e) self._logger.error(__name__, f"Cannot get UserJoinedGameServer", e)
def _check_for_user_achievements(self): async def _check_for_user_achievements(self):
self._logger.debug(__name__, f"Start checking UserGotAchievement table") self._logger.debug(__name__, f"Start checking UserGotAchievement table")
for guild in self._bot.guilds: for guild in self._bot.guilds:
@ -380,9 +380,9 @@ class DataIntegrityService:
if user is None: if user is None:
self._logger.fatal(__name__, f"User not found in database: {member.id}") self._logger.fatal(__name__, f"User not found in database: {member.id}")
self._bot.loop.create_task(self._achievements.validate_achievements_for_user(user)) await self._achievements.validate_achievements_for_user(user)
def check_data_integrity(self, is_for_shutdown=False): async def check_data_integrity(self, is_for_shutdown=False):
if is_for_shutdown != self._is_for_shutdown: if is_for_shutdown != self._is_for_shutdown:
self._is_for_shutdown = is_for_shutdown self._is_for_shutdown = is_for_shutdown
@ -393,4 +393,4 @@ class DataIntegrityService:
self._check_user_joins() self._check_user_joins()
self._check_user_joins_vc() self._check_user_joins_vc()
self._check_user_joined_gs() self._check_user_joined_gs()
self._check_for_user_achievements() await self._check_for_user_achievements()

View File

@ -15,7 +15,7 @@ __title__ = "bot_data"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_data.abc"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -15,7 +15,7 @@ __title__ = "bot_data.migration"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_data.model"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -108,6 +108,15 @@ class Achievement(TableABC):
""" """
) )
@staticmethod
def get_select_by_server_id_string(id: int) -> str:
return str(
f"""
SELECT * FROM `Achievements`
WHERE `ServerId` = {id};
"""
)
@property @property
def insert_string(self) -> str: def insert_string(self) -> str:
return str( return str(

View File

@ -15,7 +15,7 @@ __title__ = "bot_data.service"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -65,8 +65,8 @@ class AchievementRepositoryService(AchievementRepositoryABC):
def get_achievements_by_server_id(self, server_id: int) -> List[Achievement]: def get_achievements_by_server_id(self, server_id: int) -> List[Achievement]:
achievements = List(Achievement) achievements = List(Achievement)
self._logger.trace(__name__, f"Send SQL command: {Achievement.get_select_by_id_string(server_id)}") self._logger.trace(__name__, f"Send SQL command: {Achievement.get_select_by_server_id_string(server_id)}")
results = self._context.select(Achievement.get_select_all_string()) results = self._context.select(Achievement.get_select_by_server_id_string(server_id))
for result in results: for result in results:
self._logger.trace(__name__, f"Get user with id {result[0]}") self._logger.trace(__name__, f"Get user with id {result[0]}")
achievements.append(self._from_result(result)) achievements.append(self._from_result(result))

View File

@ -15,7 +15,7 @@ __title__ = "bot_graphql"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_graphql.abc"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -15,7 +15,7 @@ __title__ = "bot_graphql.filter"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_graphql.mutations"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries.discord"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.achievements"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -60,13 +60,20 @@ class AchievementService:
self._operators = { self._operators = {
"==": lambda value, expected_value: value == expected_value, "==": lambda value, expected_value: value == expected_value,
"!=": lambda value, expected_value: value != expected_value, "!=": lambda value, expected_value: value != expected_value,
"<=": lambda value, expected_value: value <= expected_value, "<=": lambda value, expected_value: self._num(value) <= self._num(expected_value),
">=": lambda value, expected_value: value >= expected_value, ">=": lambda value, expected_value: self._num(value) >= self._num(expected_value),
"<": lambda value, expected_value: value < expected_value, "<": lambda value, expected_value: self._num(value) < self._num(expected_value),
">": lambda value, expected_value: value > expected_value, ">": lambda value, expected_value: self._num(value) > self._num(expected_value),
"contains": lambda value, expected_value: expected_value in value, "contains": lambda value, expected_value: expected_value in value,
} }
@staticmethod
def _num(s: str):
try:
return int(s)
except ValueError:
return float(s)
def add_achievement_attribute(self, atr: AchievementAttribute): def add_achievement_attribute(self, atr: AchievementAttribute):
self._attributes.add(atr) self._attributes.add(atr)

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",
@ -16,10 +16,10 @@
"LicenseName": "MIT", "LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.", "LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [ "Dependencies": [
"cpl-core>=2023.4.0.post2" "cpl-core>=1.1.0.rc2"
], ],
"DevDependencies": [ "DevDependencies": [
"cpl-cli>=2023.4.0.post3" "cpl-cli>=1.1.0.rc2"
], ],
"PythonVersion": ">=3.10.4", "PythonVersion": ">=3.10.4",
"PythonPath": {}, "PythonPath": {},

View File

@ -15,7 +15,7 @@ __title__ = "modules.achievements.commands"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.achievements.events"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.achievements.model"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.auto_role"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "", "Author": "",
"AuthorEmail": "", "AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.auto_role.command"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.auto_role.events"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.auto_role.helper"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "", "Author": "",
"AuthorEmail": "", "AuthorEmail": "",

View File

@ -56,8 +56,8 @@ class BaseModule(ModuleABC):
services.add_transient(UserWarningsService) services.add_transient(UserWarningsService)
# forms # forms
services.add_singleton(BugReportForm) services.add_transient(BugReportForm)
services.add_singleton(ComplaintForm) services.add_transient(ComplaintForm)
# commands # commands
self._dc.add_command(AFKCommand) self._dc.add_command(AFKCommand)

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.command"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -10,6 +10,7 @@ from bot_core.abc.client_utils_abc import ClientUtilsABC
from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.abc.message_service_abc import MessageServiceABC
from bot_core.helper.command_checks import CommandChecks from bot_core.helper.command_checks import CommandChecks
from bot_core.logging.command_logger import CommandLogger from bot_core.logging.command_logger import CommandLogger
from bot_data.model.server_config import ServerConfig
class AFKCommand(DiscordCommandABC): class AFKCommand(DiscordCommandABC):

View File

@ -12,6 +12,7 @@ from bot_core.abc.client_utils_abc import ClientUtilsABC
from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.abc.message_service_abc import MessageServiceABC
from bot_core.helper.command_checks import CommandChecks from bot_core.helper.command_checks import CommandChecks
from bot_core.logging.command_logger import CommandLogger from bot_core.logging.command_logger import CommandLogger
from bot_data.model.technician_config import TechnicianConfig
class HelpCommand(DiscordCommandABC): class HelpCommand(DiscordCommandABC):
@ -38,7 +39,7 @@ class HelpCommand(DiscordCommandABC):
@CommandChecks.check_is_ready() @CommandChecks.check_is_ready()
async def help(self, ctx: Context, persistent_flag: str = None): async def help(self, ctx: Context, persistent_flag: str = None):
self._logger.debug(__name__, f"Received command help {ctx}:{persistent_flag}") self._logger.debug(__name__, f"Received command help {ctx}:{persistent_flag}")
settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{ctx.guild.id}") settings: TechnicianConfig = self._config.get_configuration(TechnicianConfig)
is_persistent = persistent_flag == "--stay" is_persistent = persistent_flag == "--stay"
await self._message_service.send_ctx_msg( await self._message_service.send_ctx_msg(
ctx, ctx,

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.events"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -11,6 +11,7 @@ from discord.ext.commands import Context, CommandError
from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.abc.message_service_abc import MessageServiceABC
from bot_core.exception.check_error import CheckError from bot_core.exception.check_error import CheckError
from bot_data.model.technician_config import TechnicianConfig
class BaseOnCommandErrorEvent(OnCommandErrorABC): class BaseOnCommandErrorEvent(OnCommandErrorABC):
@ -19,6 +20,7 @@ class BaseOnCommandErrorEvent(OnCommandErrorABC):
logger: LoggerABC, logger: LoggerABC,
bot: DiscordBotServiceABC, bot: DiscordBotServiceABC,
messenger: MessageServiceABC, messenger: MessageServiceABC,
tech_settings: TechnicianConfig,
time_format_settings: TimeFormatSettings, time_format_settings: TimeFormatSettings,
translate: TranslatePipe, translate: TranslatePipe,
): ):
@ -26,7 +28,7 @@ class BaseOnCommandErrorEvent(OnCommandErrorABC):
self._logger = logger self._logger = logger
self._bot = bot self._bot = bot
self._messenger = messenger self._messenger = messenger
self._bot_settings = bot_settings self._tech_settings = tech_settings
self._time_format_settings = time_format_settings self._time_format_settings = time_format_settings
self._t = translate self._t = translate
@ -264,6 +266,6 @@ class BaseOnCommandErrorEvent(OnCommandErrorABC):
datetime.datetime.now().strftime(self._time_format_settings.date_time_format), datetime.datetime.now().strftime(self._time_format_settings.date_time_format),
uid, uid,
) )
for t in self._bot_settings.technicians: for t in self._tech_settings.technician_ids:
member = self._bot.get_user(t) member = self._bot.get_user(t)
await self._messenger.send_dm_message(message, member, without_tracking=True) await self._messenger.send_dm_message(message, member, without_tracking=True)

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.forms"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.helper"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.model"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.service"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -1,4 +1,5 @@
import discord import discord
from cpl_core.configuration import ConfigurationABC
from cpl_core.database.context import DatabaseContextABC from cpl_core.database.context import DatabaseContextABC
from cpl_core.logging import LoggerABC from cpl_core.logging import LoggerABC
from cpl_discord.service import DiscordBotServiceABC from cpl_discord.service import DiscordBotServiceABC
@ -9,6 +10,7 @@ from bot_data.abc.level_repository_abc import LevelRepositoryABC
from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC
from bot_data.abc.user_repository_abc import UserRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC
from bot_data.abc.user_warnings_repository_abc import UserWarningsRepositoryABC from bot_data.abc.user_warnings_repository_abc import UserWarningsRepositoryABC
from bot_data.model.server_config import ServerConfig
from bot_data.model.user import User from bot_data.model.user import User
from bot_data.model.user_warnings import UserWarnings from bot_data.model.user_warnings import UserWarnings
from modules.level.service.level_service import LevelService from modules.level.service.level_service import LevelService
@ -18,6 +20,7 @@ from modules.permission.abc.permission_service_abc import PermissionServiceABC
class UserWarningsService: class UserWarningsService:
def __init__( def __init__(
self, self,
config: ConfigurationABC,
logger: LoggerABC, logger: LoggerABC,
db: DatabaseContextABC, db: DatabaseContextABC,
bot: DiscordBotServiceABC, bot: DiscordBotServiceABC,
@ -30,6 +33,7 @@ class UserWarningsService:
t: TranslatePipe, t: TranslatePipe,
permissions: PermissionServiceABC, permissions: PermissionServiceABC,
): ):
self._config = config
self._logger = logger self._logger = logger
self._db = db self._db = db
self._bot = bot self._bot = bot

View File

@ -15,7 +15,7 @@ __title__ = "modules.base.thread"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.boot_log"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "", "Author": "",
"AuthorEmail": "", "AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.config"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -2,9 +2,9 @@
"ProjectSettings": { "ProjectSettings": {
"Name": "config", "Name": "config",
"Version": { "Version": {
"Major": "0", "Major": "1",
"Minor": "0", "Minor": "1",
"Micro": "0" "Micro": "0.rc2"
}, },
"Author": "", "Author": "",
"AuthorEmail": "", "AuthorEmail": "",
@ -16,10 +16,10 @@
"LicenseName": "", "LicenseName": "",
"LicenseDescription": "", "LicenseDescription": "",
"Dependencies": [ "Dependencies": [
"cpl-core>=2023.4.0.post5" "cpl-core>=1.1.0.rc2"
], ],
"DevDependencies": [ "DevDependencies": [
"cpl-cli>=2023.4.0.post3" "cpl-cli>=1.1.0.rc2"
], ],
"PythonVersion": ">=3.10.4", "PythonVersion": ">=3.10.4",
"PythonPath": { "PythonPath": {

View File

@ -15,7 +15,7 @@ __title__ = "modules.config.events"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.config.service"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.database"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -48,7 +48,7 @@ class DatabaseOnReadyEvent(OnReadyABC):
async def on_ready(self): async def on_ready(self):
self._logger.debug(__name__, f"Module {type(self)} started") self._logger.debug(__name__, f"Module {type(self)} started")
self._data_integrity.check_data_integrity() await self._data_integrity.check_data_integrity()
await self._seeder.seed() await self._seeder.seed()
self._validate_init_time() self._validate_init_time()

View File

@ -15,7 +15,7 @@ __title__ = "modules.level"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.level.command"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.level.configuration"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.level.events"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "", "Author": "",
"AuthorEmail": "", "AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.level.service"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -8,6 +8,7 @@ from cpl_translation import TranslatePipe
from bot_core.service.message_service import MessageService from bot_core.service.message_service import MessageService
from bot_data.model.level import Level from bot_data.model.level import Level
from bot_data.model.server_config import ServerConfig
from bot_data.model.user import User from bot_data.model.user import User
from bot_data.service.level_repository_service import LevelRepositoryService from bot_data.service.level_repository_service import LevelRepositoryService
from bot_data.service.server_repository_service import ServerRepositoryService from bot_data.service.server_repository_service import ServerRepositoryService

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission.abc"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission.events"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "", "Author": "",
"AuthorEmail": "", "AuthorEmail": "",

View File

@ -15,7 +15,7 @@ __title__ = "modules.permission.service"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports # imports
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.technician"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -15,7 +15,7 @@ __title__ = "modules.technician.command"
__author__ = "Sven Heidemann" __author__ = "Sven Heidemann"
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.1.0rc1" __version__ = "1.1.0rc2"
from collections import namedtuple from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports: # imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro") VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="1", micro="0.rc1") version_info = VersionInfo(major="1", minor="1", micro="0.rc2")

View File

@ -11,6 +11,8 @@ from bot_core.abc.client_utils_abc import ClientUtilsABC
from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.abc.message_service_abc import MessageServiceABC
from bot_core.helper.command_checks import CommandChecks from bot_core.helper.command_checks import CommandChecks
from bot_core.logging.command_logger import CommandLogger from bot_core.logging.command_logger import CommandLogger
from bot_core.service.data_integrity_service import DataIntegrityService
from bot_data.model.technician_config import TechnicianConfig
from modules.permission.abc.permission_service_abc import PermissionServiceABC from modules.permission.abc.permission_service_abc import PermissionServiceABC
@ -24,6 +26,8 @@ class RestartCommand(DiscordCommandABC):
client_utils: ClientUtilsABC, client_utils: ClientUtilsABC,
translate: TranslatePipe, translate: TranslatePipe,
permissions: PermissionServiceABC, permissions: PermissionServiceABC,
settings: TechnicianConfig,
data_integrity: DataIntegrityService,
): ):
DiscordCommandABC.__init__(self) DiscordCommandABC.__init__(self)
@ -34,6 +38,8 @@ class RestartCommand(DiscordCommandABC):
self._client_utils = client_utils self._client_utils = client_utils
self._t = translate self._t = translate
self._permissions = permissions self._permissions = permissions
self._settings = settings
self._data_integrity = data_integrity
self._logger.trace(__name__, f"Loaded command service: {type(self).__name__}") self._logger.trace(__name__, f"Loaded command service: {type(self).__name__}")
@ -48,6 +54,7 @@ class RestartCommand(DiscordCommandABC):
await self._client_utils.presence_game("common.presence.restart") await self._client_utils.presence_game("common.presence.restart")
await self._message_service.send_ctx_msg(ctx, self._t.transform("modules.technician.restart_message")) await self._message_service.send_ctx_msg(ctx, self._t.transform("modules.technician.restart_message"))
await asyncio.sleep(self._settings.wait_for_restart) await asyncio.sleep(self._settings.wait_for_restart)
await self._data_integrity.check_data_integrity(is_for_shutdown=True)
await self._bot.stop_async() await self._bot.stop_async()
self._logger.trace(__name__, f"Finished restart command") self._logger.trace(__name__, f"Finished restart command")

View File

@ -11,6 +11,7 @@ from bot_core.abc.client_utils_abc import ClientUtilsABC
from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.abc.message_service_abc import MessageServiceABC
from bot_core.helper.command_checks import CommandChecks from bot_core.helper.command_checks import CommandChecks
from bot_core.logging.command_logger import CommandLogger from bot_core.logging.command_logger import CommandLogger
from bot_core.service.data_integrity_service import DataIntegrityService
from bot_data.model.technician_config import TechnicianConfig from bot_data.model.technician_config import TechnicianConfig
from modules.permission.abc.permission_service_abc import PermissionServiceABC from modules.permission.abc.permission_service_abc import PermissionServiceABC
@ -26,6 +27,7 @@ class ShutdownCommand(DiscordCommandABC):
translate: TranslatePipe, translate: TranslatePipe,
permissions: PermissionServiceABC, permissions: PermissionServiceABC,
settings: TechnicianConfig, settings: TechnicianConfig,
data_integrity: DataIntegrityService,
): ):
DiscordCommandABC.__init__(self) DiscordCommandABC.__init__(self)
@ -37,6 +39,7 @@ class ShutdownCommand(DiscordCommandABC):
self._t = translate self._t = translate
self._permissions = permissions self._permissions = permissions
self._settings = settings self._settings = settings
self._data_integrity = data_integrity
self._logger.trace(__name__, f"Loaded command service: {type(self).__name__}") self._logger.trace(__name__, f"Loaded command service: {type(self).__name__}")
@ -50,6 +53,7 @@ class ShutdownCommand(DiscordCommandABC):
await self._client_utils.presence_game("common.presence.shutdown") await self._client_utils.presence_game("common.presence.shutdown")
await self._message_service.send_ctx_msg(ctx, self._t.transform("modules.technician.shutdown_message")) await self._message_service.send_ctx_msg(ctx, self._t.transform("modules.technician.shutdown_message"))
await asyncio.sleep(self._settings.wait_for_shutdown) await asyncio.sleep(self._settings.wait_for_shutdown)
await self._data_integrity.check_data_integrity(is_for_shutdown=True)
await self._bot.stop_async() await self._bot.stop_async()
self._logger.trace(__name__, f"Finished shutdown command") self._logger.trace(__name__, f"Finished shutdown command")

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "", "Author": "",
"AuthorEmail": "", "AuthorEmail": "",

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -4,7 +4,7 @@
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "1", "Minor": "1",
"Micro": "0.rc1" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -3,8 +3,8 @@
"Name": "post-build", "Name": "post-build",
"Version": { "Version": {
"Major": "1", "Major": "1",
"Minor": "0", "Minor": "1",
"Micro": "7" "Micro": "0.rc2"
}, },
"Author": "Sven Heidemann", "Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de", "AuthorEmail": "sven.heidemann@sh-edraft.de",

Some files were not shown because too many files have changed in this diff Show More