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:
commit
7966ca16e5
@ -1 +1 @@
|
|||||||
Subproject commit 6b25cc87fced30b5846505d95f20285a3e4d7adf
|
Subproject commit 22b8bce69b43e43d59c109998d719dbdee2c6181
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 6e2ec8f2f88cca5355624da9c83c034949d12ae3
|
Subproject commit 781aa3f6ab861343d1635005ec7dc1814065b3c7
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -10,7 +10,6 @@ class UserDTO(DtoABC):
|
|||||||
id: int = None,
|
id: int = None,
|
||||||
dc_id: int = None,
|
dc_id: int = None,
|
||||||
xp: int = None,
|
xp: int = None,
|
||||||
minecraft_id: Optional[str] = None,
|
|
||||||
server: Optional[Server] = None,
|
server: Optional[Server] = None,
|
||||||
is_technician: Optional[bool] = None,
|
is_technician: Optional[bool] = None,
|
||||||
is_admin: Optional[bool] = None,
|
is_admin: Optional[bool] = None,
|
||||||
@ -21,7 +20,6 @@ class UserDTO(DtoABC):
|
|||||||
self._user_id = id
|
self._user_id = id
|
||||||
self._discord_id = dc_id
|
self._discord_id = dc_id
|
||||||
self._xp = xp
|
self._xp = xp
|
||||||
self._minecraft_id = minecraft_id
|
|
||||||
self._server = server
|
self._server = server
|
||||||
|
|
||||||
self._is_technician = is_technician
|
self._is_technician = is_technician
|
||||||
@ -44,14 +42,6 @@ class UserDTO(DtoABC):
|
|||||||
def xp(self, value: int):
|
def xp(self, value: int):
|
||||||
self._xp = value
|
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
|
@property
|
||||||
def server(self) -> Optional[Server]:
|
def server(self) -> Optional[Server]:
|
||||||
return self._server
|
return self._server
|
||||||
@ -72,7 +62,6 @@ class UserDTO(DtoABC):
|
|||||||
self._user_id = values["id"]
|
self._user_id = values["id"]
|
||||||
self._discord_id = values["dcId"]
|
self._discord_id = values["dcId"]
|
||||||
self._xp = values["xp"]
|
self._xp = values["xp"]
|
||||||
self._minecraft_id = values["minecraftId"]
|
|
||||||
self._server = values["server"]
|
self._server = values["server"]
|
||||||
|
|
||||||
def to_dict(self) -> dict:
|
def to_dict(self) -> dict:
|
||||||
@ -80,7 +69,6 @@ class UserDTO(DtoABC):
|
|||||||
"id": self._user_id,
|
"id": self._user_id,
|
||||||
"dcId": self._discord_id,
|
"dcId": self._discord_id,
|
||||||
"xp": self._xp,
|
"xp": self._xp,
|
||||||
"minecraftId": self._minecraft_id,
|
|
||||||
"server": self._server.id,
|
"server": self._server.id,
|
||||||
"isTechnician": self.is_technician,
|
"isTechnician": self.is_technician,
|
||||||
"isAdmin": self.is_admin,
|
"isAdmin": self.is_admin,
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -69,7 +69,6 @@ class AuthUserTransformer(TransformerABC):
|
|||||||
u.id,
|
u.id,
|
||||||
u.discord_id,
|
u.discord_id,
|
||||||
u.xp,
|
u.xp,
|
||||||
u.minecraft_id,
|
|
||||||
u.server,
|
u.server,
|
||||||
cls._is_technician(u),
|
cls._is_technician(u),
|
||||||
cls._is_admin(u),
|
cls._is_admin(u),
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -41,6 +41,8 @@ class UserJoinedGameServer(TableABC):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def time(self) -> float:
|
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)
|
return round((self.leaved_on - self.joined_on).total_seconds() / 3600, 2)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -47,6 +47,8 @@ class UserJoinedVoiceChannel(TableABC):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def time(self) -> float:
|
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)
|
return round((self.leaved_on - self.joined_on).total_seconds() / 3600, 2)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"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>=1.0.dev130"
|
"cpl-core>=1.0.0.rc1"
|
||||||
],
|
],
|
||||||
"DevDependencies": [
|
"DevDependencies": [
|
||||||
"cpl-cli>=1.0.dev130"
|
"cpl-cli>=1.0.0.rc1"
|
||||||
],
|
],
|
||||||
"PythonVersion": ">=3.10.4",
|
"PythonVersion": ">=3.10.4",
|
||||||
"PythonPath": {},
|
"PythonPath": {},
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -33,7 +33,6 @@ class UserFilter(FilterABC):
|
|||||||
self._discord_id = None
|
self._discord_id = None
|
||||||
self._name = None
|
self._name = None
|
||||||
self._xp = None
|
self._xp = None
|
||||||
self._minecraft_id = None
|
|
||||||
self._ontime = None
|
self._ontime = None
|
||||||
self._level: Optional[LevelFilter] = None
|
self._level: Optional[LevelFilter] = None
|
||||||
self._server = None
|
self._server = None
|
||||||
@ -52,9 +51,6 @@ class UserFilter(FilterABC):
|
|||||||
if "xp" in values:
|
if "xp" in values:
|
||||||
self._xp = int(values["xp"])
|
self._xp = int(values["xp"])
|
||||||
|
|
||||||
if "minecraftId" in values:
|
|
||||||
self._minecraft_id = values["minecraftId"]
|
|
||||||
|
|
||||||
if "ontime" in values:
|
if "ontime" in values:
|
||||||
self._ontime = int(values["ontime"])
|
self._ontime = int(values["ontime"])
|
||||||
|
|
||||||
@ -92,9 +88,6 @@ class UserFilter(FilterABC):
|
|||||||
if self._xp is not None:
|
if self._xp is not None:
|
||||||
query = query.where(lambda x: x.xp == self._xp)
|
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:
|
if self._ontime is not None:
|
||||||
query = query.where(lambda x: self._client_utils.get_ontime_for_user(x) == self._ontime)
|
query = query.where(lambda x: self._client_utils.get_ontime_for_user(x) == self._ontime)
|
||||||
|
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -1,24 +1,30 @@
|
|||||||
from cpl_core.database.context import DatabaseContextABC
|
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.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.model.level import Level
|
from bot_data.model.level import Level
|
||||||
from bot_data.model.user_role_enum import UserRoleEnum
|
from bot_data.model.user_role_enum import UserRoleEnum
|
||||||
from bot_graphql.abc.query_abc import QueryABC
|
from bot_graphql.abc.query_abc import QueryABC
|
||||||
|
from modules.level.level_seeder import LevelSeeder
|
||||||
|
|
||||||
|
|
||||||
class LevelMutation(QueryABC):
|
class LevelMutation(QueryABC):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
bot: DiscordBotServiceABC,
|
||||||
servers: ServerRepositoryABC,
|
servers: ServerRepositoryABC,
|
||||||
levels: LevelRepositoryABC,
|
levels: LevelRepositoryABC,
|
||||||
db: DatabaseContextABC,
|
db: DatabaseContextABC,
|
||||||
|
level_seeder: LevelSeeder,
|
||||||
):
|
):
|
||||||
QueryABC.__init__(self, "LevelMutation")
|
QueryABC.__init__(self, "LevelMutation")
|
||||||
|
|
||||||
|
self._bot = bot
|
||||||
self._servers = servers
|
self._servers = servers
|
||||||
self._levels = levels
|
self._levels = levels
|
||||||
self._db = db
|
self._db = db
|
||||||
|
self._level_seeder = level_seeder
|
||||||
|
|
||||||
self.set_field("createLevel", self.resolve_create_level)
|
self.set_field("createLevel", self.resolve_create_level)
|
||||||
self.set_field("updateLevel", self.resolve_update_level)
|
self.set_field("updateLevel", self.resolve_update_level)
|
||||||
@ -46,6 +52,7 @@ class LevelMutation(QueryABC):
|
|||||||
and l.permissions == level.permissions
|
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()
|
return self._levels.get_levels_by_server_id(level.server.id).where(get_new_level).last()
|
||||||
|
|
||||||
def resolve_update_level(self, *_, input: dict):
|
def resolve_update_level(self, *_, input: dict):
|
||||||
@ -60,6 +67,7 @@ class LevelMutation(QueryABC):
|
|||||||
self._levels.update_level(level)
|
self._levels.update_level(level)
|
||||||
self._db.save_changes()
|
self._db.save_changes()
|
||||||
|
|
||||||
|
self._bot.loop.create_task(self._level_seeder.seed())
|
||||||
level = self._levels.get_level_by_id(input["id"])
|
level = self._levels.get_level_by_id(input["id"])
|
||||||
return level
|
return level
|
||||||
|
|
||||||
@ -69,4 +77,6 @@ class LevelMutation(QueryABC):
|
|||||||
|
|
||||||
self._levels.delete_level(level)
|
self._levels.delete_level(level)
|
||||||
self._db.save_changes()
|
self._db.save_changes()
|
||||||
|
|
||||||
|
self._bot.loop.create_task(self._level_seeder.seed())
|
||||||
return level
|
return level
|
||||||
|
@ -123,6 +123,7 @@ class UserJoinedGameServerMutation(QueryABC):
|
|||||||
user.xp += round(ontime * settings.xp_per_ontime_hour)
|
user.xp += round(ontime * settings.xp_per_ontime_hour)
|
||||||
|
|
||||||
self._user_joined_game_servers.update_user_joined_game_server(active)
|
self._user_joined_game_servers.update_user_joined_game_server(active)
|
||||||
|
self._users.update_user(user)
|
||||||
self._db.save_changes()
|
self._db.save_changes()
|
||||||
self._logger.debug(
|
self._logger.debug(
|
||||||
__name__,
|
__name__,
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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")
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -305,7 +305,7 @@ class AutoRoleGroup(DiscordCommandABC):
|
|||||||
self._logger.trace(__name__, f"Finished command auto-role rule add")
|
self._logger.trace(__name__, f"Finished command auto-role rule add")
|
||||||
return
|
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()
|
self._db_context.save_changes()
|
||||||
rule = (
|
rule = (
|
||||||
self._auto_roles.get_auto_role_rules_by_auto_role_id(auto_role)
|
self._auto_roles.get_auto_role_rules_by_auto_role_id(auto_role)
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base.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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base.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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -68,9 +68,11 @@ class BootLogOnReadyEvent(OnReadyABC):
|
|||||||
self._logger.error(__name__, f"Config {type(self).__name__}_{g.id} not found!")
|
self._logger.error(__name__, f"Config {type(self).__name__}_{g.id} not found!")
|
||||||
return
|
return
|
||||||
|
|
||||||
await self._message_service.send_channel_message(
|
self._bot.loop.create_task(
|
||||||
self._bot.get_channel(module_settings.login_message_channel_id),
|
self._message_service.send_channel_message(
|
||||||
self._t.transform("modules.boot_log.login_message").format(init_time),
|
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._config.add_configuration("IS_READY", "true")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.boot_log.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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.permission.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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import discord
|
import discord
|
||||||
from cpl_core.logging import LoggerABC
|
|
||||||
from cpl_core.configuration import ConfigurationABC
|
from cpl_core.configuration import ConfigurationABC
|
||||||
|
from cpl_core.logging import LoggerABC
|
||||||
from cpl_discord.service import DiscordBotServiceABC
|
from cpl_discord.service import DiscordBotServiceABC
|
||||||
|
|
||||||
from bot_core.configuration.bot_settings import BotSettings
|
from bot_core.configuration.bot_settings import BotSettings
|
||||||
@ -126,14 +126,15 @@ class PermissionService(PermissionServiceABC):
|
|||||||
return self._technicians
|
return self._technicians
|
||||||
|
|
||||||
def is_member_admin(self, member: discord.Member) -> bool:
|
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:
|
def is_member_moderator(self, member: discord.Member) -> bool:
|
||||||
return (
|
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]
|
and member in self._moderators[member.guild.id]
|
||||||
or self.is_member_admin(member)
|
or self.is_member_admin(member)
|
||||||
)
|
)
|
||||||
|
|
||||||
def is_member_technician(self, member: discord.Member) -> bool:
|
def is_member_technician(self, member: discord.Member) -> bool:
|
||||||
return member in self._technicians
|
return member is not None and member in self._technicians
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -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.0.dev130"
|
__version__ = "1.0.0rc1"
|
||||||
|
|
||||||
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="0", micro="dev130")
|
version_info = VersionInfo(major="1", minor="0", micro="0.rc1")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "0",
|
"Minor": "0",
|
||||||
"Micro": "dev130"
|
"Micro": "0.rc1"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kdb-web",
|
"name": "kdb-web",
|
||||||
"version": "1.0.dev232",
|
"version": "1.0.0.rc1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"update-version": "ts-node-esm update-version.ts",
|
"update-version": "ts-node-esm update-version.ts",
|
||||||
|
@ -18,7 +18,6 @@ export interface UserDTO {
|
|||||||
id: number;
|
id: number;
|
||||||
discordId: number;
|
discordId: number;
|
||||||
xp: number;
|
xp: number;
|
||||||
minecraftId: number | null;
|
|
||||||
server: number;
|
server: number;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
modifiedAt: string;
|
modifiedAt: string;
|
||||||
|
@ -10,7 +10,6 @@ export interface User extends Data {
|
|||||||
discordId?: number;
|
discordId?: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
xp?: number;
|
xp?: number;
|
||||||
minecraftId?: number;
|
|
||||||
ontime?: number;
|
ontime?: number;
|
||||||
level?: Level;
|
level?: Level;
|
||||||
server?: Server;
|
server?: Server;
|
||||||
@ -31,7 +30,6 @@ export interface UserFilter {
|
|||||||
discordId?: number;
|
discordId?: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
xp?: number;
|
xp?: number;
|
||||||
minecraftId?: number;
|
|
||||||
ontime?: number;
|
ontime?: number;
|
||||||
level?: LevelFilter;
|
level?: LevelFilter;
|
||||||
server?: ServerFilter;
|
server?: ServerFilter;
|
||||||
|
@ -77,7 +77,6 @@ export class Queries {
|
|||||||
name
|
name
|
||||||
xp
|
xp
|
||||||
ontime
|
ontime
|
||||||
minecraftId
|
|
||||||
level {
|
level {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
@ -185,14 +185,14 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="btn-wrapper">
|
<div class="btn-wrapper">
|
||||||
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
|
<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"
|
<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"
|
<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"
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -21,6 +21,7 @@ import { LevelMutationResult, UpdateUserMutationResult } from "../../../../../..
|
|||||||
import { Mutations } from "../../../../../../models/graphql/mutations.model";
|
import { Mutations } from "../../../../../../models/graphql/mutations.model";
|
||||||
import { Subject, throwError } from "rxjs";
|
import { Subject, throwError } from "rxjs";
|
||||||
import { Server } from "../../../../../../models/data/server.model";
|
import { Server } from "../../../../../../models/data/server.model";
|
||||||
|
import { UserDTO } from "../../../../../../models/auth/auth-user.dto";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-levels",
|
selector: "app-levels",
|
||||||
@ -58,6 +59,7 @@ export class LevelsComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
private unsubscriber = new Subject<void>();
|
private unsubscriber = new Subject<void>();
|
||||||
private server: Server = {};
|
private server: Server = {};
|
||||||
|
public user: UserDTO | null = null;
|
||||||
|
|
||||||
public constructor(
|
public constructor(
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
@ -73,9 +75,11 @@ export class LevelsComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
public ngOnInit(): void {
|
public ngOnInit(): void {
|
||||||
this.setFilterForm();
|
this.setFilterForm();
|
||||||
this.data.getServerFromRoute(this.route).then(server => {
|
this.data.getServerFromRoute(this.route).then(async server => {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.loadNextPage();
|
this.loadNextPage();
|
||||||
|
let authUser = await this.authService.getLoggedInUser();
|
||||||
|
this.user = authUser?.users?.find(u => u.server == this.server.id) ?? null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,12 +41,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content-row">
|
<!-- <div class="content-row">-->
|
||||||
<div class="content-column">
|
<!-- <div class="content-column">-->
|
||||||
<div class="content-data-name">{{'view.server.profile.minecraft_id' | translate}}:</div>
|
<!-- <div class="content-data-name">{{'view.server.profile.minecraft_id' | translate}}:</div>-->
|
||||||
<div class="content-data-value">{{user.minecraftId}}</div>
|
<!-- <div class="content-data-value">{{user.minecraftId}}</div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
<div class="content-row">
|
<div class="content-row">
|
||||||
<div class="content-column">
|
<div class="content-column">
|
||||||
|
@ -3,7 +3,7 @@ import { MenuItem } from "primeng/api";
|
|||||||
import { BehaviorSubject } from "rxjs";
|
import { BehaviorSubject } from "rxjs";
|
||||||
import { AuthRoles } from "../../models/auth/auth-roles.enum";
|
import { AuthRoles } from "../../models/auth/auth-roles.enum";
|
||||||
import { AuthService } from "../auth/auth.service";
|
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 { NavigationEnd, Router } from "@angular/router";
|
||||||
import { ThemeService } from "../theme/theme.service";
|
import { ThemeService } from "../theme/theme.service";
|
||||||
import { Server } from "../../models/data/server.model";
|
import { Server } from "../../models/data/server.model";
|
||||||
@ -41,7 +41,7 @@ export class SidebarService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.translateService.onLangChange.subscribe(_ => {
|
this.translateService.onLangChange.subscribe(_ => {
|
||||||
this.setMenu();
|
this.setMenu(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.router.events.subscribe(event => {
|
this.router.events.subscribe(event => {
|
||||||
@ -140,8 +140,8 @@ export class SidebarService {
|
|||||||
if (this.server$.value) {
|
if (this.server$.value) {
|
||||||
this.serverMenu.visible = true;
|
this.serverMenu.visible = true;
|
||||||
this.serverMembers.visible = !!user?.isModerator;
|
this.serverMembers.visible = !!user?.isModerator;
|
||||||
this.serverAutoRoles.visible = !!user?.isAdmin;
|
this.serverAutoRoles.visible = !!user?.isModerator;
|
||||||
this.serverLevels.visible = !!user?.isAdmin;
|
this.serverLevels.visible = !!user?.isModerator;
|
||||||
} else {
|
} else {
|
||||||
this.serverMenu.visible = false;
|
this.serverMenu.visible = false;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user