Merge pull request '1.0.0.rc1' (#244) from 1.0.0.rc1 into 1.0.0

Reviewed-on: sh-edraft.de/kd_discord_bot#244
Reviewed-by: edraft-dev <dev.sven.heidemann@sh-edraft.de>
This commit is contained in:
Sven Heidemann 2023-03-11 01:12:31 +01:00
commit 7966ca16e5
102 changed files with 221 additions and 197 deletions

@ -1 +1 @@
Subproject commit 6b25cc87fced30b5846505d95f20285a3e4d7adf
Subproject commit 22b8bce69b43e43d59c109998d719dbdee2c6181

View File

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

View File

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

@ -1 +1 @@
Subproject commit 6e2ec8f2f88cca5355624da9c83c034949d12ae3
Subproject commit 781aa3f6ab861343d1635005ec7dc1814065b3c7

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,6 @@ class UserDTO(DtoABC):
id: int = None,
dc_id: int = None,
xp: int = None,
minecraft_id: Optional[str] = None,
server: Optional[Server] = None,
is_technician: Optional[bool] = None,
is_admin: Optional[bool] = None,
@ -21,7 +20,6 @@ class UserDTO(DtoABC):
self._user_id = id
self._discord_id = dc_id
self._xp = xp
self._minecraft_id = minecraft_id
self._server = server
self._is_technician = is_technician
@ -44,14 +42,6 @@ class UserDTO(DtoABC):
def xp(self, value: int):
self._xp = value
@property
def minecraft_id(self) -> Optional[str]:
return self._minecraft_id
@minecraft_id.setter
def minecraft_id(self, value: str):
self._minecraft_id = value
@property
def server(self) -> Optional[Server]:
return self._server
@ -72,7 +62,6 @@ class UserDTO(DtoABC):
self._user_id = values["id"]
self._discord_id = values["dcId"]
self._xp = values["xp"]
self._minecraft_id = values["minecraftId"]
self._server = values["server"]
def to_dict(self) -> dict:
@ -80,7 +69,6 @@ class UserDTO(DtoABC):
"id": self._user_id,
"dcId": self._discord_id,
"xp": self._xp,
"minecraftId": self._minecraft_id,
"server": self._server.id,
"isTechnician": self.is_technician,
"isAdmin": self.is_admin,

View File

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

View File

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

View File

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

View File

@ -69,7 +69,6 @@ class AuthUserTransformer(TransformerABC):
u.id,
u.discord_id,
u.xp,
u.minecraft_id,
u.server,
cls._is_technician(u),
cls._is_admin(u),

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -41,6 +41,8 @@ class UserJoinedGameServer(TableABC):
@property
def time(self) -> float:
if self._leaved_on is None or self._joined_on is None:
return 0
return round((self.leaved_on - self.joined_on).total_seconds() / 3600, 2)
@property

View File

@ -47,6 +47,8 @@ class UserJoinedVoiceChannel(TableABC):
@property
def time(self) -> float:
if self._leaved_on is None or self._joined_on is None:
return 0
return round((self.leaved_on - self.joined_on).total_seconds() / 3600, 2)
@property

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,7 +33,6 @@ class UserFilter(FilterABC):
self._discord_id = None
self._name = None
self._xp = None
self._minecraft_id = None
self._ontime = None
self._level: Optional[LevelFilter] = None
self._server = None
@ -52,9 +51,6 @@ class UserFilter(FilterABC):
if "xp" in values:
self._xp = int(values["xp"])
if "minecraftId" in values:
self._minecraft_id = values["minecraftId"]
if "ontime" in values:
self._ontime = int(values["ontime"])
@ -92,9 +88,6 @@ class UserFilter(FilterABC):
if self._xp is not None:
query = query.where(lambda x: x.xp == self._xp)
if self._minecraft_id is not None:
query = query.where(lambda x: x.minecraft_id == self._minecraft_id)
if self._ontime is not None:
query = query.where(lambda x: self._client_utils.get_ontime_for_user(x) == self._ontime)

View File

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

View File

@ -1,24 +1,30 @@
from cpl_core.database.context import DatabaseContextABC
from cpl_discord.service import DiscordBotServiceABC
from bot_data.abc.level_repository_abc import LevelRepositoryABC
from bot_data.abc.server_repository_abc import ServerRepositoryABC
from bot_data.model.level import Level
from bot_data.model.user_role_enum import UserRoleEnum
from bot_graphql.abc.query_abc import QueryABC
from modules.level.level_seeder import LevelSeeder
class LevelMutation(QueryABC):
def __init__(
self,
bot: DiscordBotServiceABC,
servers: ServerRepositoryABC,
levels: LevelRepositoryABC,
db: DatabaseContextABC,
level_seeder: LevelSeeder,
):
QueryABC.__init__(self, "LevelMutation")
self._bot = bot
self._servers = servers
self._levels = levels
self._db = db
self._level_seeder = level_seeder
self.set_field("createLevel", self.resolve_create_level)
self.set_field("updateLevel", self.resolve_update_level)
@ -46,6 +52,7 @@ class LevelMutation(QueryABC):
and l.permissions == level.permissions
)
self._bot.loop.create_task(self._level_seeder.seed())
return self._levels.get_levels_by_server_id(level.server.id).where(get_new_level).last()
def resolve_update_level(self, *_, input: dict):
@ -60,6 +67,7 @@ class LevelMutation(QueryABC):
self._levels.update_level(level)
self._db.save_changes()
self._bot.loop.create_task(self._level_seeder.seed())
level = self._levels.get_level_by_id(input["id"])
return level
@ -69,4 +77,6 @@ class LevelMutation(QueryABC):
self._levels.delete_level(level)
self._db.save_changes()
self._bot.loop.create_task(self._level_seeder.seed())
return level

View File

@ -123,6 +123,7 @@ class UserJoinedGameServerMutation(QueryABC):
user.xp += round(ontime * settings.xp_per_ontime_hour)
self._user_joined_game_servers.update_user_joined_game_server(active)
self._users.update_user(user)
self._db.save_changes()
self._logger.debug(
__name__,

View File

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

View File

@ -0,0 +1,26 @@
# -*- 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__ = "bot_graphql.queries.discord"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "1.0.0rc1"
from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")

View File

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

View File

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

View File

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

View File

@ -305,7 +305,7 @@ class AutoRoleGroup(DiscordCommandABC):
self._logger.trace(__name__, f"Finished command auto-role rule add")
return
self._auto_roles.add_auto_role_rule(AutoRoleRule(auto_role, emoji_name, int(role_id)))
self._auto_roles.add_auto_role_rule(AutoRoleRule(auto_role_from_db, emoji_name, int(role_id)))
self._db_context.save_changes()
rule = (
self._auto_roles.get_auto_role_rules_by_auto_role_id(auto_role)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -68,10 +68,12 @@ class BootLogOnReadyEvent(OnReadyABC):
self._logger.error(__name__, f"Config {type(self).__name__}_{g.id} not found!")
return
await self._message_service.send_channel_message(
self._bot.loop.create_task(
self._message_service.send_channel_message(
self._bot.get_channel(module_settings.login_message_channel_id),
self._t.transform("modules.boot_log.login_message").format(init_time),
)
)
self._config.add_configuration("IS_READY", "true")
self._logger.info(__name__, "Bot is ready")

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
import discord
from cpl_core.logging import LoggerABC
from cpl_core.configuration import ConfigurationABC
from cpl_core.logging import LoggerABC
from cpl_discord.service import DiscordBotServiceABC
from bot_core.configuration.bot_settings import BotSettings
@ -126,14 +126,15 @@ class PermissionService(PermissionServiceABC):
return self._technicians
def is_member_admin(self, member: discord.Member) -> bool:
return member.guild.id in self._admins and member in self._admins[member.guild.id]
return member is not None and member.guild.id in self._admins and member in self._admins[member.guild.id]
def is_member_moderator(self, member: discord.Member) -> bool:
return (
member.guild.id in self._moderators
member is not None
and member.guild.id in self._moderators
and member in self._moderators[member.guild.id]
or self.is_member_admin(member)
)
def is_member_technician(self, member: discord.Member) -> bool:
return member in self._technicians
return member is not None and member in self._technicians

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "kdb-web",
"version": "1.0.dev232",
"version": "1.0.0.rc1",
"scripts": {
"ng": "ng",
"update-version": "ts-node-esm update-version.ts",

View File

@ -18,7 +18,6 @@ export interface UserDTO {
id: number;
discordId: number;
xp: number;
minecraftId: number | null;
server: number;
createdAt: string;
modifiedAt: string;

View File

@ -10,7 +10,6 @@ export interface User extends Data {
discordId?: number;
name?: string;
xp?: number;
minecraftId?: number;
ontime?: number;
level?: Level;
server?: Server;
@ -31,7 +30,6 @@ export interface UserFilter {
discordId?: number;
name?: string;
xp?: number;
minecraftId?: number;
ontime?: number;
level?: LevelFilter;
server?: ServerFilter;

View File

@ -77,7 +77,6 @@ export class Queries {
name
xp
ontime
minecraftId
level {
id
name

View File

@ -185,14 +185,14 @@
<td>
<div class="btn-wrapper">
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
(click)="onRowEditInit(dt, level, ri)"></button>
(click)="onRowEditInit(dt, level, ri)" [disabled]="!user || user.isModerator && !user.isAdmin"></button>
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"
(click)="deleteLevel(level)"></button>
(click)="deleteLevel(level)" [disabled]="!user || user.isModerator && !user.isAdmin"></button>
<button *ngIf="editing" pButton pSaveEditableRow class="btn icon-btn"
icon="pi pi-check-circle" (click)="onRowEditSave(dt, level, ri)"></button>
icon="pi pi-check-circle" (click)="onRowEditSave(dt, level, ri)" [disabled]="!user || user.isModerator && !user.isAdmin"></button>
<button *ngIf="editing" pButton pCancelEditableRow class="btn icon-btn danger-icon-btn"
icon="pi pi-times-circle" (click)="onRowEditCancel(ri)"></button>
icon="pi pi-times-circle" (click)="onRowEditCancel(ri)" [disabled]="!user || user.isModerator && !user.isAdmin"></button>
</div>
</td>
</tr>

View File

@ -21,6 +21,7 @@ import { LevelMutationResult, UpdateUserMutationResult } from "../../../../../..
import { Mutations } from "../../../../../../models/graphql/mutations.model";
import { Subject, throwError } from "rxjs";
import { Server } from "../../../../../../models/data/server.model";
import { UserDTO } from "../../../../../../models/auth/auth-user.dto";
@Component({
selector: "app-levels",
@ -58,6 +59,7 @@ export class LevelsComponent implements OnInit, OnDestroy {
private unsubscriber = new Subject<void>();
private server: Server = {};
public user: UserDTO | null = null;
public constructor(
private authService: AuthService,
@ -73,9 +75,11 @@ export class LevelsComponent implements OnInit, OnDestroy {
public ngOnInit(): void {
this.setFilterForm();
this.data.getServerFromRoute(this.route).then(server => {
this.data.getServerFromRoute(this.route).then(async server => {
this.server = server;
this.loadNextPage();
let authUser = await this.authService.getLoggedInUser();
this.user = authUser?.users?.find(u => u.server == this.server.id) ?? null;
});
}

View File

@ -41,12 +41,12 @@
</div>
</div>
<div class="content-row">
<div class="content-column">
<div class="content-data-name">{{'view.server.profile.minecraft_id' | translate}}:</div>
<div class="content-data-value">{{user.minecraftId}}</div>
</div>
</div>
<!-- <div class="content-row">-->
<!-- <div class="content-column">-->
<!-- <div class="content-data-name">{{'view.server.profile.minecraft_id' | translate}}:</div>-->
<!-- <div class="content-data-value">{{user.minecraftId}}</div>-->
<!-- </div>-->
<!-- </div>-->
<div class="content-row">
<div class="content-column">

View File

@ -3,7 +3,7 @@ import { MenuItem } from "primeng/api";
import { BehaviorSubject } from "rxjs";
import { AuthRoles } from "../../models/auth/auth-roles.enum";
import { AuthService } from "../auth/auth.service";
import { TranslateService } from "@ngx-translate/core";
import { LangChangeEvent, TranslateService } from "@ngx-translate/core";
import { NavigationEnd, Router } from "@angular/router";
import { ThemeService } from "../theme/theme.service";
import { Server } from "../../models/data/server.model";
@ -41,7 +41,7 @@ export class SidebarService {
});
this.translateService.onLangChange.subscribe(_ => {
this.setMenu();
this.setMenu(true);
});
this.router.events.subscribe(event => {
@ -140,8 +140,8 @@ export class SidebarService {
if (this.server$.value) {
this.serverMenu.visible = true;
this.serverMembers.visible = !!user?.isModerator;
this.serverAutoRoles.visible = !!user?.isAdmin;
this.serverLevels.visible = !!user?.isAdmin;
this.serverAutoRoles.visible = !!user?.isModerator;
this.serverLevels.visible = !!user?.isModerator;
} else {
this.serverMenu.visible = false;
}

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