Merge pull request 'dev' (#400) from dev into master
All checks were successful
Deploy dev on push / on-push-deploy_sh-edraft (push) Successful in 3m13s
All checks were successful
Deploy dev on push / on-push-deploy_sh-edraft (push) Successful in 3m13s
Reviewed-on: sh-edraft.de/kd_discord_bot#400
This commit is contained in:
commit
eeda0405f3
@ -5,7 +5,7 @@ volumes:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
kdb_bot_staging_1:
|
kdb_bot_staging_1:
|
||||||
image: sh-edraft.de/kdb-bot:1.1.9
|
image: sh-edraft.de/kdb-bot:1.1.10
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- kdb_db_staging_1
|
- kdb_db_staging_1
|
||||||
@ -32,7 +32,7 @@ services:
|
|||||||
memory: 1024M
|
memory: 1024M
|
||||||
|
|
||||||
kdb_web_staging_1:
|
kdb_web_staging_1:
|
||||||
image: sh-edraft.de/kdb-web:1.1.9
|
image: sh-edraft.de/kdb-web:1.1.10
|
||||||
depends_on:
|
depends_on:
|
||||||
- kdb_bot_staging_1
|
- kdb_bot_staging_1
|
||||||
networks:
|
networks:
|
||||||
|
@ -5,7 +5,7 @@ volumes:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
kdb_bot_prod_1:
|
kdb_bot_prod_1:
|
||||||
image: sh-edraft.de/kdb-bot:1.1.9
|
image: sh-edraft.de/kdb-bot:1.1.10
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- kdb_db_prod_1
|
- kdb_db_prod_1
|
||||||
@ -31,7 +31,7 @@ services:
|
|||||||
memory: 1024M
|
memory: 1024M
|
||||||
|
|
||||||
kdb_web_prod_1:
|
kdb_web_prod_1:
|
||||||
image: sh-edraft.de/kdb-web:1.1.9
|
image: sh-edraft.de/kdb-web:1.1.10
|
||||||
depends_on:
|
depends_on:
|
||||||
- kdb_bot_prod_1
|
- kdb_bot_prod_1
|
||||||
networks:
|
networks:
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot.extension"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.abc"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"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.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.controller"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.event"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.exception"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.filter"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.filter.discord"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.logging"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.model"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.model.discord"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.route"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.service"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_api.transformer"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core.abc"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"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.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -24,3 +24,4 @@ class FeatureFlagsEnum(Enum):
|
|||||||
game_server = "GameServer"
|
game_server = "GameServer"
|
||||||
sync_xp = "SyncXp"
|
sync_xp = "SyncXp"
|
||||||
short_role_name = "ShortRoleName"
|
short_role_name = "ShortRoleName"
|
||||||
|
technician_full_access = "TechnicianFullAccess"
|
||||||
|
@ -26,6 +26,7 @@ class FeatureFlagsSettings(ConfigurationModelABC):
|
|||||||
FeatureFlagsEnum.game_server.value: False, # 25.09.2023 #366
|
FeatureFlagsEnum.game_server.value: False, # 25.09.2023 #366
|
||||||
FeatureFlagsEnum.sync_xp.value: False, # 25.09.2023 #366
|
FeatureFlagsEnum.sync_xp.value: False, # 25.09.2023 #366
|
||||||
FeatureFlagsEnum.short_role_name.value: False, # 28.09.2023 #378
|
FeatureFlagsEnum.short_role_name.value: False, # 28.09.2023 #378
|
||||||
|
FeatureFlagsEnum.technician_full_access.value: False, # 03.10.2023 #393
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, **kwargs: dict):
|
def __init__(self, **kwargs: dict):
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core.core_extension"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core.events"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core.exception"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core.helper"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core.logging"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core.pipes"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_core.service"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -7,8 +7,6 @@ from bot_data.abc.technician_config_repository_abc import TechnicianConfigReposi
|
|||||||
from bot_data.model.server import Server
|
from bot_data.model.server import Server
|
||||||
from bot_data.model.technician_config import TechnicianConfig
|
from bot_data.model.technician_config import TechnicianConfig
|
||||||
from bot_data.service.server_config_seeder import ServerConfigSeeder
|
from bot_data.service.server_config_seeder import ServerConfigSeeder
|
||||||
from bot_data.service.technician_config_seeder import TechnicianConfigSeeder
|
|
||||||
from modules.permission.abc.permission_service_abc import PermissionServiceABC
|
|
||||||
|
|
||||||
|
|
||||||
class ConfigService:
|
class ConfigService:
|
||||||
@ -18,7 +16,6 @@ class ConfigService:
|
|||||||
services: ServiceProviderABC,
|
services: ServiceProviderABC,
|
||||||
technician_config_repo: TechnicianConfigRepositoryABC,
|
technician_config_repo: TechnicianConfigRepositoryABC,
|
||||||
server_config_repo: ServerConfigRepositoryABC,
|
server_config_repo: ServerConfigRepositoryABC,
|
||||||
tech_seeder: TechnicianConfigSeeder,
|
|
||||||
server_seeder: ServerConfigSeeder,
|
server_seeder: ServerConfigSeeder,
|
||||||
):
|
):
|
||||||
self._config = config
|
self._config = config
|
||||||
@ -26,13 +23,9 @@ class ConfigService:
|
|||||||
self._technician_config_repo = technician_config_repo
|
self._technician_config_repo = technician_config_repo
|
||||||
self._server_config_repo = server_config_repo
|
self._server_config_repo = server_config_repo
|
||||||
|
|
||||||
self._tech_seeder = tech_seeder
|
|
||||||
self._server_seeder = server_seeder
|
self._server_seeder = server_seeder
|
||||||
|
|
||||||
async def reload_technician_config(self):
|
def reload_technician_config(self):
|
||||||
if not self._technician_config_repo.does_technician_config_exists():
|
|
||||||
await self._tech_seeder.seed()
|
|
||||||
|
|
||||||
technician_config = self._technician_config_repo.get_technician_config()
|
technician_config = self._technician_config_repo.get_technician_config()
|
||||||
self._config.add_configuration(TechnicianConfig, technician_config)
|
self._config.add_configuration(TechnicianConfig, technician_config)
|
||||||
self._config.add_configuration(FeatureFlagsSettings, FeatureFlagsSettings(**technician_config.feature_flags))
|
self._config.add_configuration(FeatureFlagsSettings, FeatureFlagsSettings(**technician_config.feature_flags))
|
||||||
@ -45,6 +38,3 @@ class ConfigService:
|
|||||||
self._config.add_configuration(
|
self._config.add_configuration(
|
||||||
f"{type(server_config).__name__}_{server_config.server.discord_id}", server_config
|
f"{type(server_config).__name__}_{server_config.server.discord_id}", server_config
|
||||||
)
|
)
|
||||||
|
|
||||||
permissions: PermissionServiceABC = self._services.get_service(PermissionServiceABC)
|
|
||||||
permissions.on_ready()
|
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_data"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_data.abc"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"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.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_data.model"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_data.service"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_graphql"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_graphql.abc"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_graphql.filter"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_graphql.model"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_graphql.mutations"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -13,7 +13,6 @@ from bot_data.model.server_team_role_ids_config import ServerTeamRoleIdsConfig
|
|||||||
from bot_data.model.team_member_type_enum import TeamMemberTypeEnum
|
from bot_data.model.team_member_type_enum import TeamMemberTypeEnum
|
||||||
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.permission.abc.permission_service_abc import PermissionServiceABC
|
|
||||||
|
|
||||||
|
|
||||||
class ServerConfigMutation(QueryABC):
|
class ServerConfigMutation(QueryABC):
|
||||||
@ -25,7 +24,6 @@ class ServerConfigMutation(QueryABC):
|
|||||||
server_configs: ServerConfigRepositoryABC,
|
server_configs: ServerConfigRepositoryABC,
|
||||||
db: DatabaseContextABC,
|
db: DatabaseContextABC,
|
||||||
config_service: ConfigService,
|
config_service: ConfigService,
|
||||||
permissions: PermissionServiceABC,
|
|
||||||
):
|
):
|
||||||
QueryABC.__init__(self, "ServerConfigMutation")
|
QueryABC.__init__(self, "ServerConfigMutation")
|
||||||
|
|
||||||
@ -35,7 +33,6 @@ class ServerConfigMutation(QueryABC):
|
|||||||
self._server_configs = server_configs
|
self._server_configs = server_configs
|
||||||
self._db = db
|
self._db = db
|
||||||
self._config_service = config_service
|
self._config_service = config_service
|
||||||
self._permissions = permissions
|
|
||||||
|
|
||||||
self.set_field("updateServerConfig", self.resolve_update_server_config)
|
self.set_field("updateServerConfig", self.resolve_update_server_config)
|
||||||
|
|
||||||
@ -183,4 +180,3 @@ class ServerConfigMutation(QueryABC):
|
|||||||
self._server_configs.add_server_team_role_id_config(role_id)
|
self._server_configs.add_server_team_role_id_config(role_id)
|
||||||
|
|
||||||
self._bot.loop.create_task(self._config_service.reload_server_config(new_config.server))
|
self._bot.loop.create_task(self._config_service.reload_server_config(new_config.server))
|
||||||
self._permissions.on_ready()
|
|
||||||
|
@ -11,8 +11,8 @@ from bot_data.model.technician_config import TechnicianConfig
|
|||||||
from bot_data.model.technician_id_config import TechnicianIdConfig
|
from bot_data.model.technician_id_config import TechnicianIdConfig
|
||||||
from bot_data.model.technician_ping_url_config import TechnicianPingUrlConfig
|
from bot_data.model.technician_ping_url_config import TechnicianPingUrlConfig
|
||||||
from bot_data.model.user_role_enum import UserRoleEnum
|
from bot_data.model.user_role_enum import UserRoleEnum
|
||||||
|
from bot_data.service.technician_config_seeder import TechnicianConfigSeeder
|
||||||
from bot_graphql.abc.query_abc import QueryABC
|
from bot_graphql.abc.query_abc import QueryABC
|
||||||
from modules.permission.abc.permission_service_abc import PermissionServiceABC
|
|
||||||
|
|
||||||
|
|
||||||
class TechnicianConfigMutation(QueryABC):
|
class TechnicianConfigMutation(QueryABC):
|
||||||
@ -23,8 +23,8 @@ class TechnicianConfigMutation(QueryABC):
|
|||||||
servers: ServerRepositoryABC,
|
servers: ServerRepositoryABC,
|
||||||
technician_configs: TechnicianConfigRepositoryABC,
|
technician_configs: TechnicianConfigRepositoryABC,
|
||||||
db: DatabaseContextABC,
|
db: DatabaseContextABC,
|
||||||
permissions: PermissionServiceABC,
|
|
||||||
config_service: ConfigService,
|
config_service: ConfigService,
|
||||||
|
tech_seeder: TechnicianConfigSeeder,
|
||||||
):
|
):
|
||||||
QueryABC.__init__(self, "TechnicianConfigMutation")
|
QueryABC.__init__(self, "TechnicianConfigMutation")
|
||||||
|
|
||||||
@ -33,12 +33,15 @@ class TechnicianConfigMutation(QueryABC):
|
|||||||
self._servers = servers
|
self._servers = servers
|
||||||
self._technician_configs = technician_configs
|
self._technician_configs = technician_configs
|
||||||
self._db = db
|
self._db = db
|
||||||
self._permissions = permissions
|
|
||||||
self._config_service = config_service
|
self._config_service = config_service
|
||||||
|
self._tech_seeder = tech_seeder
|
||||||
|
|
||||||
self.set_field("updateTechnicianConfig", self.resolve_update_technician_config)
|
self.set_field("updateTechnicianConfig", self.resolve_update_technician_config)
|
||||||
|
|
||||||
def resolve_update_technician_config(self, *_, input: dict):
|
def resolve_update_technician_config(self, *_, input: dict):
|
||||||
|
if not self._technician_configs.does_technician_config_exists():
|
||||||
|
self._bot.loop.create_task(self._tech_seeder.seed())
|
||||||
|
|
||||||
technician_config = self._technician_configs.get_technician_config()
|
technician_config = self._technician_configs.get_technician_config()
|
||||||
self._can_user_mutate_data(Route.get_user().users[0].server, UserRoleEnum.technician)
|
self._can_user_mutate_data(Route.get_user().users[0].server, UserRoleEnum.technician)
|
||||||
|
|
||||||
@ -56,11 +59,16 @@ class TechnicianConfigMutation(QueryABC):
|
|||||||
technician_config.cache_max_messages = (
|
technician_config.cache_max_messages = (
|
||||||
input["cacheMaxMessages"] if "cacheMaxMessages" in input else technician_config.cache_max_messages
|
input["cacheMaxMessages"] if "cacheMaxMessages" in input else technician_config.cache_max_messages
|
||||||
)
|
)
|
||||||
|
old_feature_flags = technician_config.feature_flags
|
||||||
technician_config.feature_flags = (
|
technician_config.feature_flags = (
|
||||||
dict(zip([x["key"] for x in input["featureFlags"]], [x["value"] for x in input["featureFlags"]]))
|
dict(zip([x["key"] for x in input["featureFlags"]], [x["value"] for x in input["featureFlags"]]))
|
||||||
if "featureFlags" in input
|
if "featureFlags" in input
|
||||||
else technician_config.feature_flags
|
else technician_config.feature_flags
|
||||||
)
|
)
|
||||||
|
for old_flag in old_feature_flags:
|
||||||
|
if old_flag not in technician_config.feature_flags:
|
||||||
|
technician_config.feature_flags[old_flag] = False
|
||||||
|
|
||||||
technician_config.ping_urls = (
|
technician_config.ping_urls = (
|
||||||
List(str, input["pingURLs"]) if "pingURLs" in input else technician_config.ping_urls
|
List(str, input["pingURLs"]) if "pingURLs" in input else technician_config.ping_urls
|
||||||
)
|
)
|
||||||
@ -78,6 +86,7 @@ class TechnicianConfigMutation(QueryABC):
|
|||||||
self._update_technician_ids(technician_config)
|
self._update_technician_ids(technician_config)
|
||||||
|
|
||||||
self._db.save_changes()
|
self._db.save_changes()
|
||||||
|
self._config_service.reload_technician_config()
|
||||||
return technician_config
|
return technician_config
|
||||||
|
|
||||||
def _update_ping_urls(self, new_config: TechnicianConfig):
|
def _update_ping_urls(self, new_config: TechnicianConfig):
|
||||||
@ -112,6 +121,3 @@ class TechnicianConfigMutation(QueryABC):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
self._technician_configs.add_technician_id_config(TechnicianIdConfig(technician_id))
|
self._technician_configs.add_technician_id_config(TechnicianIdConfig(technician_id))
|
||||||
|
|
||||||
self._bot.loop.create_task(self._config_service.reload_technician_config())
|
|
||||||
self._permissions.on_ready()
|
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries.discord"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.achievements"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"Author": "Sven Heidemann",
|
"Author": "Sven Heidemann",
|
||||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.achievements.commands"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.achievements.events"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.achievements.model"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.auto_role"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"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.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.auto_role.events"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.auto_role.helper"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"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.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base.events"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -31,6 +31,17 @@ class BaseOnVoiceStateUpdateEventHelpChannel(OnVoiceStateUpdateABC):
|
|||||||
|
|
||||||
self._logger.info(__name__, f"Module {type(self)} loaded")
|
self._logger.info(__name__, f"Module {type(self)} loaded")
|
||||||
|
|
||||||
|
async def _notify_team(self, member: discord.Member):
|
||||||
|
self._logger.debug(__name__, f"Notify team that a member needs help")
|
||||||
|
settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{member.guild.id}")
|
||||||
|
channel = member.guild.get_channel(settings.team_channel_id)
|
||||||
|
await self._message_service.send_channel_message(
|
||||||
|
channel,
|
||||||
|
self._t.transform("modules.base.member_joined_help_voice_channel").format(member.mention),
|
||||||
|
is_persistent=True,
|
||||||
|
)
|
||||||
|
self._logger.trace(__name__, f"Notified team that a member need help")
|
||||||
|
|
||||||
@EventChecks.check_is_ready()
|
@EventChecks.check_is_ready()
|
||||||
async def on_voice_state_update(
|
async def on_voice_state_update(
|
||||||
self,
|
self,
|
||||||
@ -44,14 +55,6 @@ class BaseOnVoiceStateUpdateEventHelpChannel(OnVoiceStateUpdateABC):
|
|||||||
if after.channel is None or after.channel.id != settings.help_voice_channel_id:
|
if after.channel is None or after.channel.id != settings.help_voice_channel_id:
|
||||||
return
|
return
|
||||||
|
|
||||||
mods = [
|
await self._notify_team(member)
|
||||||
*self._permissions.get_admins(member.guild.id),
|
|
||||||
*self._permissions.get_moderators(member.guild.id),
|
|
||||||
]
|
|
||||||
for a in mods:
|
|
||||||
await self._message_service.send_dm_message(
|
|
||||||
self._t.transform("modules.base.member_joined_help_voice_channel").format(member.mention),
|
|
||||||
a,
|
|
||||||
)
|
|
||||||
|
|
||||||
self._logger.debug(__name__, f"Module {type(self)} stopped")
|
self._logger.debug(__name__, f"Module {type(self)} stopped")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base.forms"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base.helper"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base.model"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base.service"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.base.thread"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.boot_log"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -67,7 +67,7 @@ class BootLogOnReadyEvent(OnReadyABC):
|
|||||||
|
|
||||||
server_config: ServerConfig = self._config.get_configuration(f"ServerConfig_{g.id}")
|
server_config: ServerConfig = self._config.get_configuration(f"ServerConfig_{g.id}")
|
||||||
if server_config is None:
|
if server_config is None:
|
||||||
self._logger.error(__name__, f"Config {type(self).__name__}_{g.id} not found!")
|
self._logger.error(__name__, f"Config ServerConfig_{g.id} not found!")
|
||||||
return
|
return
|
||||||
|
|
||||||
if not FeatureFlagsSettings.get_flag_from_dict(
|
if not FeatureFlagsSettings.get_flag_from_dict(
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.config"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -19,4 +19,4 @@ class ConfigExtension(ApplicationExtensionABC):
|
|||||||
logger: LoggerABC = services.get_service(LoggerABC)
|
logger: LoggerABC = services.get_service(LoggerABC)
|
||||||
logger.debug(__name__, "Config extension started")
|
logger.debug(__name__, "Config extension started")
|
||||||
config: ConfigService = services.get_service(ConfigService)
|
config: ConfigService = services.get_service(ConfigService)
|
||||||
await config.reload_technician_config()
|
config.reload_technician_config()
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.config.events"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.config.service"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.database"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"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.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.level.command"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.level.configuration"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.level.events"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"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.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.permission"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.permission.abc"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -8,42 +8,6 @@ class PermissionServiceABC(ABC):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def on_ready(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def on_member_update(self, before: discord.Member, after: discord.Member):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def get_admin_role_ids(self, g_id: int) -> list[int]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def get_admin_roles(self, g_id: int) -> list[discord.Role]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def get_admins(self, g_id: int) -> list[discord.Member]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def get_moderator_role_ids(self, g_id: int) -> list[int]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def get_moderator_roles(self, g_id: int) -> list[discord.Role]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def get_moderators(self, g_id: int) -> list[discord.Member]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def get_technicians(self) -> list[discord.Member]:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def is_member_admin(self, member: discord.Member) -> bool:
|
def is_member_admin(self, member: discord.Member) -> bool:
|
||||||
pass
|
pass
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
bot sh-edraft.de Discord bot
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Discord bot for customers of sh-edraft.de
|
|
||||||
|
|
||||||
:copyright: (c) 2022 - 2023 sh-edraft.de
|
|
||||||
:license: MIT, see LICENSE for more details.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
__title__ = "modules.permission.events"
|
|
||||||
__author__ = "Sven Heidemann"
|
|
||||||
__license__ = "MIT"
|
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
|
||||||
__version__ = "1.1.9"
|
|
||||||
|
|
||||||
from collections import namedtuple
|
|
||||||
|
|
||||||
|
|
||||||
# imports:
|
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
|
@ -1,30 +0,0 @@
|
|||||||
import discord
|
|
||||||
from cpl_core.configuration import ConfigurationABC
|
|
||||||
from cpl_core.logging import LoggerABC
|
|
||||||
from cpl_discord.events import OnMemberUpdateABC
|
|
||||||
|
|
||||||
from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum
|
|
||||||
from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings
|
|
||||||
from bot_data.model.server_config import ServerConfig
|
|
||||||
from modules.permission.abc.permission_service_abc import PermissionServiceABC
|
|
||||||
|
|
||||||
|
|
||||||
class PermissionOnMemberUpdateEvent(OnMemberUpdateABC):
|
|
||||||
def __init__(self, config: ConfigurationABC, logger: LoggerABC, permission_service: PermissionServiceABC):
|
|
||||||
OnMemberUpdateABC.__init__(self)
|
|
||||||
self._config = config
|
|
||||||
self._logger = logger
|
|
||||||
self._permission_service = permission_service
|
|
||||||
|
|
||||||
async def on_member_update(self, before: discord.Member, after: discord.Member):
|
|
||||||
if before.guild is not None:
|
|
||||||
server_config: ServerConfig = self._config.get_configuration(f"ServerConfig_{before.guild.id}")
|
|
||||||
if not FeatureFlagsSettings.get_flag_from_dict(
|
|
||||||
server_config.feature_flags, FeatureFlagsEnum.permission_module
|
|
||||||
):
|
|
||||||
return
|
|
||||||
|
|
||||||
self._logger.debug(__name__, f"Module {type(self)} started")
|
|
||||||
|
|
||||||
if before.roles != after.roles:
|
|
||||||
self._permission_service.on_member_update(before, after)
|
|
@ -1,22 +0,0 @@
|
|||||||
from cpl_core.logging import LoggerABC
|
|
||||||
from cpl_discord.events import OnReadyABC
|
|
||||||
|
|
||||||
from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum
|
|
||||||
from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings
|
|
||||||
from bot_data.model.technician_config import TechnicianConfig
|
|
||||||
from modules.permission.abc.permission_service_abc import PermissionServiceABC
|
|
||||||
|
|
||||||
|
|
||||||
class PermissionOnReadyEvent(OnReadyABC):
|
|
||||||
def __init__(self, logger: LoggerABC, permission_service: PermissionServiceABC, tech_config: TechnicianConfig):
|
|
||||||
OnReadyABC.__init__(self)
|
|
||||||
self._logger = logger
|
|
||||||
self._permission_service = permission_service
|
|
||||||
self._tech_config = tech_config
|
|
||||||
|
|
||||||
async def on_ready(self):
|
|
||||||
if not FeatureFlagsSettings.get_flag_from_dict(
|
|
||||||
self._tech_config.feature_flags, FeatureFlagsEnum.permission_module
|
|
||||||
):
|
|
||||||
return
|
|
||||||
self._permission_service.on_ready()
|
|
@ -4,7 +4,7 @@
|
|||||||
"Version": {
|
"Version": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "9"
|
"Micro": "10"
|
||||||
},
|
},
|
||||||
"Author": "",
|
"Author": "",
|
||||||
"AuthorEmail": "",
|
"AuthorEmail": "",
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
from cpl_core.configuration import ConfigurationABC
|
from cpl_core.configuration import ConfigurationABC
|
||||||
from cpl_core.dependency_injection import ServiceCollectionABC
|
from cpl_core.dependency_injection import ServiceCollectionABC
|
||||||
from cpl_core.environment import ApplicationEnvironmentABC
|
from cpl_core.environment import ApplicationEnvironmentABC
|
||||||
from cpl_discord.discord_event_types_enum import DiscordEventTypesEnum
|
|
||||||
from cpl_discord.service.discord_collection_abc import DiscordCollectionABC
|
from cpl_discord.service.discord_collection_abc import DiscordCollectionABC
|
||||||
|
|
||||||
from bot_core.abc.module_abc import ModuleABC
|
from bot_core.abc.module_abc import ModuleABC
|
||||||
from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum
|
from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum
|
||||||
from modules.permission.abc.permission_service_abc import PermissionServiceABC
|
from modules.permission.abc.permission_service_abc import PermissionServiceABC
|
||||||
from modules.permission.events.permission_on_member_update_event import (
|
|
||||||
PermissionOnMemberUpdateEvent,
|
|
||||||
)
|
|
||||||
from modules.permission.events.permission_on_ready_event import PermissionOnReadyEvent
|
|
||||||
from modules.permission.service.permission_service import PermissionService
|
from modules.permission.service.permission_service import PermissionService
|
||||||
|
|
||||||
|
|
||||||
@ -22,8 +17,6 @@ class PermissionModule(ModuleABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def configure_services(self, services: ServiceCollectionABC, env: ApplicationEnvironmentABC):
|
def configure_services(self, services: ServiceCollectionABC, env: ApplicationEnvironmentABC):
|
||||||
services.add_singleton(PermissionServiceABC, PermissionService)
|
services.add_transient(PermissionServiceABC, PermissionService)
|
||||||
# commands
|
# commands
|
||||||
# events
|
# events
|
||||||
self._dc.add_event(DiscordEventTypesEnum.on_ready.value, PermissionOnReadyEvent)
|
|
||||||
self._dc.add_event(DiscordEventTypesEnum.on_member_update.value, PermissionOnMemberUpdateEvent)
|
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.permission.service"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -3,146 +3,72 @@ from cpl_core.configuration import ConfigurationABC
|
|||||||
from cpl_core.logging import LoggerABC
|
from cpl_core.logging import LoggerABC
|
||||||
from cpl_discord.service import DiscordBotServiceABC
|
from cpl_discord.service import DiscordBotServiceABC
|
||||||
|
|
||||||
from bot_data.model.server_config import ServerConfig
|
from bot_data.abc.server_config_repository_abc import ServerConfigRepositoryABC
|
||||||
|
from bot_data.abc.server_repository_abc import ServerRepositoryABC
|
||||||
|
from bot_data.abc.technician_config_repository_abc import TechnicianConfigRepositoryABC
|
||||||
from bot_data.model.team_member_type_enum import TeamMemberTypeEnum
|
from bot_data.model.team_member_type_enum import TeamMemberTypeEnum
|
||||||
from bot_data.model.technician_config import TechnicianConfig
|
|
||||||
from modules.permission.abc.permission_service_abc import PermissionServiceABC
|
from modules.permission.abc.permission_service_abc import PermissionServiceABC
|
||||||
|
|
||||||
|
|
||||||
class PermissionService(PermissionServiceABC):
|
class PermissionService(PermissionServiceABC):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
technician_settings: TechnicianConfig,
|
|
||||||
logger: LoggerABC,
|
logger: LoggerABC,
|
||||||
bot: DiscordBotServiceABC,
|
bot: DiscordBotServiceABC,
|
||||||
config: ConfigurationABC,
|
config: ConfigurationABC,
|
||||||
|
servers: ServerRepositoryABC,
|
||||||
|
server_configs: ServerConfigRepositoryABC,
|
||||||
|
technician_configs: TechnicianConfigRepositoryABC,
|
||||||
):
|
):
|
||||||
PermissionServiceABC.__init__(self)
|
PermissionServiceABC.__init__(self)
|
||||||
self._logger = logger
|
self._logger = logger
|
||||||
self._bot = bot
|
self._bot = bot
|
||||||
self._config = config
|
self._config = config
|
||||||
self._technician_settings = technician_settings
|
self._servers = servers
|
||||||
|
self._server_configs = server_configs
|
||||||
|
self._technician_configs = technician_configs
|
||||||
|
|
||||||
self._admin_role_ids: dict[int, list[int]] = {}
|
def _has_member_role(self, member: discord.Member, team_member_type: TeamMemberTypeEnum) -> bool:
|
||||||
self._admin_roles: dict[int, list[discord.Role]] = {}
|
if member is None or member.guild is None:
|
||||||
self._admins: dict[int, list[discord.Member]] = {}
|
return False
|
||||||
|
|
||||||
self._moderator_role_ids: dict[int, list[int]] = {}
|
self._logger.debug(__name__, f"Checking is member {member.name} {team_member_type.value}")
|
||||||
self._moderator_roles: dict[int, list[discord.Role]] = {}
|
|
||||||
self._moderators: dict[int, list[discord.Member]] = {}
|
|
||||||
|
|
||||||
self._technician_ids: list[int] = technician_settings.technician_ids.to_list()
|
try:
|
||||||
self._technicians: list[discord.Member] = []
|
server = self._servers.get_server_by_discord_id(member.guild.id)
|
||||||
|
config = self._server_configs.get_server_config_by_server(server.id)
|
||||||
def on_ready(self):
|
roles = config.team_role_ids.where(lambda x: x.team_member_type == team_member_type).select(
|
||||||
for guild in self._bot.guilds:
|
lambda x: member.guild.get_role(x.role_id)
|
||||||
guild: discord.Guild = guild
|
)
|
||||||
self._logger.debug(__name__, f"Validate permission settings")
|
for role in roles:
|
||||||
|
if role not in member.roles:
|
||||||
for technician_id in self._technician_ids:
|
|
||||||
technician = guild.get_member(technician_id)
|
|
||||||
if technician is None:
|
|
||||||
continue
|
continue
|
||||||
self._technicians.append(technician)
|
|
||||||
|
|
||||||
settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{guild.id}")
|
return True
|
||||||
if settings is None:
|
except Exception as e:
|
||||||
self._logger.error(__name__, "Server settings not found")
|
self._logger.error(__name__, "Permission check failed", e)
|
||||||
return
|
|
||||||
|
|
||||||
self._admin_role_ids[guild.id] = (
|
return False
|
||||||
settings.team_role_ids.where(lambda x: x.team_member_type == TeamMemberTypeEnum.admin)
|
|
||||||
.select(lambda x: x.role_id)
|
|
||||||
.to_list()
|
|
||||||
)
|
|
||||||
self._moderator_role_ids[guild.id] = (
|
|
||||||
settings.team_role_ids.where(lambda x: x.team_member_type == TeamMemberTypeEnum.moderator)
|
|
||||||
.select(lambda x: x.role_id)
|
|
||||||
.to_list()
|
|
||||||
)
|
|
||||||
|
|
||||||
admin_roles = []
|
|
||||||
admins = []
|
|
||||||
|
|
||||||
mod_roles = []
|
|
||||||
mods = []
|
|
||||||
|
|
||||||
for role in guild.roles:
|
|
||||||
role: discord.Role = role
|
|
||||||
|
|
||||||
if role.id in self._admin_role_ids[guild.id]:
|
|
||||||
admin_roles.append(role)
|
|
||||||
self._logger.trace(__name__, f"Added admin role {role}")
|
|
||||||
|
|
||||||
for member in role.members:
|
|
||||||
admins.append(member)
|
|
||||||
self._logger.trace(__name__, f"Added admin {member}")
|
|
||||||
|
|
||||||
if role.id in self._moderator_role_ids[guild.id]:
|
|
||||||
mod_roles.append(role)
|
|
||||||
self._logger.trace(__name__, f"Added moderator role {role}")
|
|
||||||
|
|
||||||
for member in role.members:
|
|
||||||
mods.append(member)
|
|
||||||
self._logger.trace(__name__, f"Added moderator {member}")
|
|
||||||
|
|
||||||
self._admin_roles[guild.id] = admin_roles
|
|
||||||
self._admins[guild.id] = admins
|
|
||||||
self._moderator_roles[guild.id] = mod_roles
|
|
||||||
self._moderators[guild.id] = mods
|
|
||||||
|
|
||||||
def on_member_update(self, before: discord.Member, after: discord.Member):
|
|
||||||
g_id = after.guild.id
|
|
||||||
|
|
||||||
for admin_role in self._admin_roles[g_id]:
|
|
||||||
if admin_role in before.roles and admin_role not in after.roles:
|
|
||||||
self._admins[g_id].remove(after)
|
|
||||||
self._logger.trace(__name__, f"Removed {after.id} from admins")
|
|
||||||
|
|
||||||
elif admin_role in after.roles and admin_role not in before.roles:
|
|
||||||
self._admins[g_id].append(after)
|
|
||||||
self._logger.trace(__name__, f"Added {after.id} to admins")
|
|
||||||
|
|
||||||
for moderator_role in self._moderator_roles[g_id]:
|
|
||||||
if moderator_role in before.roles and moderator_role not in after.roles:
|
|
||||||
self._moderators[g_id].remove(after)
|
|
||||||
self._logger.trace(__name__, f"Removed {after.id} from moderators")
|
|
||||||
|
|
||||||
elif moderator_role in after.roles and moderator_role not in before.roles:
|
|
||||||
self._moderators[g_id].append(after)
|
|
||||||
self._logger.trace(__name__, f"Added {after.id} to moderators")
|
|
||||||
|
|
||||||
def get_admin_role_ids(self, g_id: int) -> list[int]:
|
|
||||||
return self._admin_role_ids[g_id]
|
|
||||||
|
|
||||||
def get_admin_roles(self, g_id: int) -> list[discord.Role]:
|
|
||||||
return self._admin_roles[g_id]
|
|
||||||
|
|
||||||
def get_admins(self, g_id: int) -> list[discord.Member]:
|
|
||||||
return self._admins[g_id]
|
|
||||||
|
|
||||||
def get_moderator_role_ids(self, g_id: int) -> list[int]:
|
|
||||||
return self._moderator_role_ids[g_id]
|
|
||||||
|
|
||||||
def get_moderator_roles(self, g_id: int) -> list[discord.Role]:
|
|
||||||
return self._moderator_roles[g_id]
|
|
||||||
|
|
||||||
def get_moderators(self, g_id: int) -> list[discord.Member]:
|
|
||||||
return self._moderators[g_id]
|
|
||||||
|
|
||||||
def get_technicians(self) -> list[discord.Member]:
|
|
||||||
return self._technicians
|
|
||||||
|
|
||||||
def is_member_admin(self, member: discord.Member) -> bool:
|
def is_member_admin(self, member: discord.Member) -> bool:
|
||||||
return member is not None and member.guild.id in self._admins and member in self._admins[member.guild.id]
|
return self._has_member_role(member, TeamMemberTypeEnum.admin)
|
||||||
|
|
||||||
def is_member_moderator(self, member: discord.Member) -> bool:
|
def is_member_moderator(self, member: discord.Member) -> bool:
|
||||||
return (
|
return self._has_member_role(member, TeamMemberTypeEnum.moderator) or self._has_member_role(
|
||||||
member is not None
|
member, TeamMemberTypeEnum.admin
|
||||||
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:
|
def is_member_technician(self, member: discord.Member) -> bool:
|
||||||
return member is not None and member in self._technicians
|
if member is None or member.guild is None:
|
||||||
|
return False
|
||||||
|
|
||||||
|
self._logger.debug(__name__, f"Checking is member {member.name} technician")
|
||||||
|
|
||||||
|
try:
|
||||||
|
tech_config = self._technician_configs.get_technician_config()
|
||||||
|
if member.id in tech_config.technician_ids:
|
||||||
|
return True
|
||||||
|
except Exception as e:
|
||||||
|
self._logger.error(__name__, "Permission check failed", e)
|
||||||
|
|
||||||
|
return False
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.short_role_name"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.short_role_name.events"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.short_role_name.service"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports
|
# imports
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
@ -15,7 +15,7 @@ __title__ = "modules.technician"
|
|||||||
__author__ = "Sven Heidemann"
|
__author__ = "Sven Heidemann"
|
||||||
__license__ = "MIT"
|
__license__ = "MIT"
|
||||||
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
__version__ = "1.1.9"
|
__version__ = "1.1.10"
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
@ -23,4 +23,4 @@ from collections import namedtuple
|
|||||||
# imports:
|
# imports:
|
||||||
|
|
||||||
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
version_info = VersionInfo(major="1", minor="1", micro="9")
|
version_info = VersionInfo(major="1", minor="1", micro="10")
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user