diff --git a/kdb-bot/src/bot/__init__.py b/kdb-bot/src/bot/__init__.py index 4b3e3785..d0d8f570 100644 --- a/kdb-bot/src/bot/__init__.py +++ b/kdb-bot/src/bot/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index 80b798a7..78b1b65a 100644 --- a/kdb-bot/src/bot/bot.json +++ b/kdb-bot/src/bot/bot.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/bot/extension/__init__.py b/kdb-bot/src/bot/extension/__init__.py index 871eadd9..7c892d38 100644 --- a/kdb-bot/src/bot/extension/__init__.py +++ b/kdb-bot/src/bot/extension/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot.extension" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/__init__.py b/kdb-bot/src/bot_api/__init__.py index 5181563d..51d29a30 100644 --- a/kdb-bot/src/bot_api/__init__.py +++ b/kdb-bot/src/bot_api/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/abc/__init__.py b/kdb-bot/src/bot_api/abc/__init__.py index c5ecb97a..dc7e2b43 100644 --- a/kdb-bot/src/bot_api/abc/__init__.py +++ b/kdb-bot/src/bot_api/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/bot-api.json b/kdb-bot/src/bot_api/bot-api.json index 7fa1281e..bdae6e9e 100644 --- a/kdb-bot/src/bot_api/bot-api.json +++ b/kdb-bot/src/bot_api/bot-api.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/bot_api/configuration/__init__.py b/kdb-bot/src/bot_api/configuration/__init__.py index e409c976..9f223fad 100644 --- a/kdb-bot/src/bot_api/configuration/__init__.py +++ b/kdb-bot/src/bot_api/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/controller/__init__.py b/kdb-bot/src/bot_api/controller/__init__.py index 94bcedc9..9ee4d6d6 100644 --- a/kdb-bot/src/bot_api/controller/__init__.py +++ b/kdb-bot/src/bot_api/controller/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.controller" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/event/__init__.py b/kdb-bot/src/bot_api/event/__init__.py index eee44937..892aeab0 100644 --- a/kdb-bot/src/bot_api/event/__init__.py +++ b/kdb-bot/src/bot_api/event/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.event" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/exception/__init__.py b/kdb-bot/src/bot_api/exception/__init__.py index 5e697022..9b1fa99a 100644 --- a/kdb-bot/src/bot_api/exception/__init__.py +++ b/kdb-bot/src/bot_api/exception/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.exception" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/filter/__init__.py b/kdb-bot/src/bot_api/filter/__init__.py index e325b5d1..60cd2692 100644 --- a/kdb-bot/src/bot_api/filter/__init__.py +++ b/kdb-bot/src/bot_api/filter/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.filter" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/filter/discord/__init__.py b/kdb-bot/src/bot_api/filter/discord/__init__.py index 1f2eeeef..6a1c9fab 100644 --- a/kdb-bot/src/bot_api/filter/discord/__init__.py +++ b/kdb-bot/src/bot_api/filter/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.filter.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/logging/__init__.py b/kdb-bot/src/bot_api/logging/__init__.py index 7da20f8c..1a031e95 100644 --- a/kdb-bot/src/bot_api/logging/__init__.py +++ b/kdb-bot/src/bot_api/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.logging" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/model/__init__.py b/kdb-bot/src/bot_api/model/__init__.py index 6350b944..c824da3f 100644 --- a/kdb-bot/src/bot_api/model/__init__.py +++ b/kdb-bot/src/bot_api/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/model/discord/__init__.py b/kdb-bot/src/bot_api/model/discord/__init__.py index 19d48ec0..4a87a0aa 100644 --- a/kdb-bot/src/bot_api/model/discord/__init__.py +++ b/kdb-bot/src/bot_api/model/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.model.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/route/__init__.py b/kdb-bot/src/bot_api/route/__init__.py index b1b410bc..2a0b5da4 100644 --- a/kdb-bot/src/bot_api/route/__init__.py +++ b/kdb-bot/src/bot_api/route/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.route" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/service/__init__.py b/kdb-bot/src/bot_api/service/__init__.py index db63d114..1091d965 100644 --- a/kdb-bot/src/bot_api/service/__init__.py +++ b/kdb-bot/src/bot_api/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_api/transformer/__init__.py b/kdb-bot/src/bot_api/transformer/__init__.py index cfc971bb..34fb7398 100644 --- a/kdb-bot/src/bot_api/transformer/__init__.py +++ b/kdb-bot/src/bot_api/transformer/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.transformer" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/__init__.py b/kdb-bot/src/bot_core/__init__.py index def26fc0..3aa811ef 100644 --- a/kdb-bot/src/bot_core/__init__.py +++ b/kdb-bot/src/bot_core/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/abc/__init__.py b/kdb-bot/src/bot_core/abc/__init__.py index 304dd99b..ec930c7e 100644 --- a/kdb-bot/src/bot_core/abc/__init__.py +++ b/kdb-bot/src/bot_core/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/bot-core.json b/kdb-bot/src/bot_core/bot-core.json index 9a39ae38..350db5bd 100644 --- a/kdb-bot/src/bot_core/bot-core.json +++ b/kdb-bot/src/bot_core/bot-core.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/bot_core/configuration/__init__.py b/kdb-bot/src/bot_core/configuration/__init__.py index 1131da14..47adb094 100644 --- a/kdb-bot/src/bot_core/configuration/__init__.py +++ b/kdb-bot/src/bot_core/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/core_extension/__init__.py b/kdb-bot/src/bot_core/core_extension/__init__.py index 649eafe8..e7489d7f 100644 --- a/kdb-bot/src/bot_core/core_extension/__init__.py +++ b/kdb-bot/src/bot_core/core_extension/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.core_extension" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/events/__init__.py b/kdb-bot/src/bot_core/events/__init__.py index 7d89fbd5..8d10c699 100644 --- a/kdb-bot/src/bot_core/events/__init__.py +++ b/kdb-bot/src/bot_core/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/exception/__init__.py b/kdb-bot/src/bot_core/exception/__init__.py index 517ac08f..69a93d4b 100644 --- a/kdb-bot/src/bot_core/exception/__init__.py +++ b/kdb-bot/src/bot_core/exception/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.exception" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/helper/__init__.py b/kdb-bot/src/bot_core/helper/__init__.py index d7dad015..03a09f38 100644 --- a/kdb-bot/src/bot_core/helper/__init__.py +++ b/kdb-bot/src/bot_core/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/logging/__init__.py b/kdb-bot/src/bot_core/logging/__init__.py index 4e3b920e..c1df89dc 100644 --- a/kdb-bot/src/bot_core/logging/__init__.py +++ b/kdb-bot/src/bot_core/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.logging" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/pipes/__init__.py b/kdb-bot/src/bot_core/pipes/__init__.py index 7a235189..8a309605 100644 --- a/kdb-bot/src/bot_core/pipes/__init__.py +++ b/kdb-bot/src/bot_core/pipes/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.pipes" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_core/service/__init__.py b/kdb-bot/src/bot_core/service/__init__.py index c60a226f..7a0abbfa 100644 --- a/kdb-bot/src/bot_core/service/__init__.py +++ b/kdb-bot/src/bot_core/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_data/__init__.py b/kdb-bot/src/bot_data/__init__.py index 240b7f7d..71ac1ccf 100644 --- a/kdb-bot/src/bot_data/__init__.py +++ b/kdb-bot/src/bot_data/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_data/abc/__init__.py b/kdb-bot/src/bot_data/abc/__init__.py index 5f6e0498..89d347a4 100644 --- a/kdb-bot/src/bot_data/abc/__init__.py +++ b/kdb-bot/src/bot_data/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_data/bot-data.json b/kdb-bot/src/bot_data/bot-data.json index 5f4d6718..01f5f99d 100644 --- a/kdb-bot/src/bot_data/bot-data.json +++ b/kdb-bot/src/bot_data/bot-data.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/bot_data/migration/__init__.py b/kdb-bot/src/bot_data/migration/__init__.py index ccc712b5..d79e3bc4 100644 --- a/kdb-bot/src/bot_data/migration/__init__.py +++ b/kdb-bot/src/bot_data/migration/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.migration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_data/model/__init__.py b/kdb-bot/src/bot_data/model/__init__.py index 380b3c52..dc762ac3 100644 --- a/kdb-bot/src/bot_data/model/__init__.py +++ b/kdb-bot/src/bot_data/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_data/service/__init__.py b/kdb-bot/src/bot_data/service/__init__.py index b9f6d59d..d5e10677 100644 --- a/kdb-bot/src/bot_data/service/__init__.py +++ b/kdb-bot/src/bot_data/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_graphql/__init__.py b/kdb-bot/src/bot_graphql/__init__.py index 81e0382b..57d6beb8 100644 --- a/kdb-bot/src/bot_graphql/__init__.py +++ b/kdb-bot/src/bot_graphql/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_graphql/abc/__init__.py b/kdb-bot/src/bot_graphql/abc/__init__.py index 9cdcafb9..b67d68d3 100644 --- a/kdb-bot/src/bot_graphql/abc/__init__.py +++ b/kdb-bot/src/bot_graphql/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_graphql/bot-graphql.json b/kdb-bot/src/bot_graphql/bot-graphql.json index 2e15977d..50727684 100644 --- a/kdb-bot/src/bot_graphql/bot-graphql.json +++ b/kdb-bot/src/bot_graphql/bot-graphql.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/bot_graphql/filter/__init__.py b/kdb-bot/src/bot_graphql/filter/__init__.py index 446aa89d..a32d9d60 100644 --- a/kdb-bot/src/bot_graphql/filter/__init__.py +++ b/kdb-bot/src/bot_graphql/filter/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.filter" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_graphql/model/achievement.gql b/kdb-bot/src/bot_graphql/graphql/achievement.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/achievement.gql rename to kdb-bot/src/bot_graphql/graphql/achievement.gql diff --git a/kdb-bot/src/bot_graphql/model/autoRole.gql b/kdb-bot/src/bot_graphql/graphql/autoRole.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/autoRole.gql rename to kdb-bot/src/bot_graphql/graphql/autoRole.gql diff --git a/kdb-bot/src/bot_graphql/model/autoRoleRule.gql b/kdb-bot/src/bot_graphql/graphql/autoRoleRule.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/autoRoleRule.gql rename to kdb-bot/src/bot_graphql/graphql/autoRoleRule.gql diff --git a/kdb-bot/src/bot_graphql/model/base.gql b/kdb-bot/src/bot_graphql/graphql/base.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/base.gql rename to kdb-bot/src/bot_graphql/graphql/base.gql diff --git a/kdb-bot/src/bot_graphql/model/client.gql b/kdb-bot/src/bot_graphql/graphql/client.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/client.gql rename to kdb-bot/src/bot_graphql/graphql/client.gql diff --git a/kdb-bot/src/bot_graphql/graphql/discord.gql b/kdb-bot/src/bot_graphql/graphql/discord.gql new file mode 100644 index 00000000..0c880a3f --- /dev/null +++ b/kdb-bot/src/bot_graphql/graphql/discord.gql @@ -0,0 +1,53 @@ +type Discord { + guilds(filter: GuildFilter): [Guild] + users(filter: DiscordUserFilter): [DiscordUser] +} + +type Guild { + id: ID + name: String + + channels(filter: ChannelFilter): [Channel] + roles: [Role] + emojis: [Emoji] +} + +input GuildFilter { + id: ID + name: String +} + +type Channel { + id: String + name: String + type: String +} + +input ChannelFilter { + id: String + name: String + type: String +} + +type Role { + id: String + name: String +} + +type DiscordUser { + id: String + name: String + bot: Boolean +} + +input DiscordUserFilter { + id: ID + name: String + bot: Boolean +} + +type Emoji { + id: String + name: String + url: String +} \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/model/featureFlags.gql b/kdb-bot/src/bot_graphql/graphql/featureFlags.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/featureFlags.gql rename to kdb-bot/src/bot_graphql/graphql/featureFlags.gql diff --git a/kdb-bot/src/bot_graphql/model/knownUser.gql b/kdb-bot/src/bot_graphql/graphql/knownUser.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/knownUser.gql rename to kdb-bot/src/bot_graphql/graphql/knownUser.gql diff --git a/kdb-bot/src/bot_graphql/model/level.gql b/kdb-bot/src/bot_graphql/graphql/level.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/level.gql rename to kdb-bot/src/bot_graphql/graphql/level.gql diff --git a/kdb-bot/src/bot_graphql/model/mutation.gql b/kdb-bot/src/bot_graphql/graphql/mutation.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/mutation.gql rename to kdb-bot/src/bot_graphql/graphql/mutation.gql diff --git a/kdb-bot/src/bot_graphql/model/query.gql b/kdb-bot/src/bot_graphql/graphql/query.gql similarity index 97% rename from kdb-bot/src/bot_graphql/model/query.gql rename to kdb-bot/src/bot_graphql/graphql/query.gql index 8c8a9de1..af2d298e 100644 --- a/kdb-bot/src/bot_graphql/model/query.gql +++ b/kdb-bot/src/bot_graphql/graphql/query.gql @@ -38,7 +38,6 @@ type Query { achievementOperators: [String] technicianConfig: TechnicianConfig - - guilds(filter: GuildFilter): [Guild] possibleFeatureFlags: [String] + discord: Discord } \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/model/server.gql b/kdb-bot/src/bot_graphql/graphql/server.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/server.gql rename to kdb-bot/src/bot_graphql/graphql/server.gql diff --git a/kdb-bot/src/bot_graphql/model/serverConfig.gql b/kdb-bot/src/bot_graphql/graphql/serverConfig.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/serverConfig.gql rename to kdb-bot/src/bot_graphql/graphql/serverConfig.gql diff --git a/kdb-bot/src/bot_graphql/model/technicianConfig.gql b/kdb-bot/src/bot_graphql/graphql/technicianConfig.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/technicianConfig.gql rename to kdb-bot/src/bot_graphql/graphql/technicianConfig.gql diff --git a/kdb-bot/src/bot_graphql/model/user.gql b/kdb-bot/src/bot_graphql/graphql/user.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/user.gql rename to kdb-bot/src/bot_graphql/graphql/user.gql diff --git a/kdb-bot/src/bot_graphql/model/userJoinedGameServer.gql b/kdb-bot/src/bot_graphql/graphql/userJoinedGameServer.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/userJoinedGameServer.gql rename to kdb-bot/src/bot_graphql/graphql/userJoinedGameServer.gql diff --git a/kdb-bot/src/bot_graphql/model/userJoinedServer.gql b/kdb-bot/src/bot_graphql/graphql/userJoinedServer.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/userJoinedServer.gql rename to kdb-bot/src/bot_graphql/graphql/userJoinedServer.gql diff --git a/kdb-bot/src/bot_graphql/model/userJoinedVoiceChannel.gql b/kdb-bot/src/bot_graphql/graphql/userJoinedVoiceChannel.gql similarity index 100% rename from kdb-bot/src/bot_graphql/model/userJoinedVoiceChannel.gql rename to kdb-bot/src/bot_graphql/graphql/userJoinedVoiceChannel.gql diff --git a/kdb-bot/src/bot_graphql/graphql_module.py b/kdb-bot/src/bot_graphql/graphql_module.py index 2b294950..1236a7b2 100644 --- a/kdb-bot/src/bot_graphql/graphql_module.py +++ b/kdb-bot/src/bot_graphql/graphql_module.py @@ -37,6 +37,12 @@ from bot_graphql.queries.auto_role_rule_history_query import AutoRoleRuleHistory from bot_graphql.queries.auto_role_rule_query import AutoRoleRuleQuery from bot_graphql.queries.client_history_query import ClientHistoryQuery from bot_graphql.queries.client_query import ClientQuery +from bot_graphql.queries.discord.channel_query import ChannelQuery +from bot_graphql.queries.discord.discord_query import DiscordQuery +from bot_graphql.queries.discord.discord_user_query import DiscordUserQuery +from bot_graphql.queries.discord.emoji_query import EmojiQuery +from bot_graphql.queries.discord.guild_query import GuildQuery +from bot_graphql.queries.discord.role_query import RoleQuery from bot_graphql.queries.game_server_query import GameServerQuery from bot_graphql.queries.known_user_history_query import KnownUserHistoryQuery from bot_graphql.queries.known_user_query import KnownUserQuery @@ -105,6 +111,13 @@ class GraphQLModule(ModuleABC): services.add_transient(QueryABC, UserJoinedGameServerHistoryQuery) services.add_transient(QueryABC, UserJoinedGameServerQuery) + services.add_transient(QueryABC, DiscordQuery) + services.add_transient(QueryABC, GuildQuery) + services.add_transient(QueryABC, ChannelQuery) + services.add_transient(QueryABC, RoleQuery) + services.add_transient(QueryABC, EmojiQuery) + services.add_transient(QueryABC, DiscordUserQuery) + # filters services.add_transient(FilterABC, AutoRoleFilter) services.add_transient(FilterABC, AutoRoleRuleFilter) diff --git a/kdb-bot/src/bot_graphql/model/__init__.py b/kdb-bot/src/bot_graphql/model/__init__.py new file mode 100644 index 00000000..425ab6c1 --- /dev/null +++ b/kdb-bot/src/bot_graphql/model/__init__.py @@ -0,0 +1 @@ +# imports diff --git a/kdb-bot/src/bot_graphql/model/discord.gql b/kdb-bot/src/bot_graphql/model/discord.gql deleted file mode 100644 index 1218b790..00000000 --- a/kdb-bot/src/bot_graphql/model/discord.gql +++ /dev/null @@ -1,29 +0,0 @@ -type Guild { - id: ID - name: String - - channels: [Channel] - roles: [Role] - emojis: [Emoji] -} - -input GuildFilter { - id: ID -} - -type Channel { - id: String - name: String - type: String -} - -type Role { - id: String - name: String -} - -type Emoji { - id: String - name: String - url: String -} \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/model/discord.py b/kdb-bot/src/bot_graphql/model/discord.py new file mode 100644 index 00000000..353e7d8f --- /dev/null +++ b/kdb-bot/src/bot_graphql/model/discord.py @@ -0,0 +1,16 @@ +from cpl_query.extension import List +from discord import Guild, User + + +class Discord: + def __init__(self, guilds: List[Guild], users: List[User]): + self._guilds = guilds + self._users = users + + @property + def guilds(self) -> List[Guild]: + return self._guilds + + @property + def users(self) -> List[User]: + return self._users diff --git a/kdb-bot/src/bot_graphql/mutations/__init__.py b/kdb-bot/src/bot_graphql/mutations/__init__.py index bec170af..5c3cf6f6 100644 --- a/kdb-bot/src/bot_graphql/mutations/__init__.py +++ b/kdb-bot/src/bot_graphql/mutations/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.mutations" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_graphql/queries/__init__.py b/kdb-bot/src/bot_graphql/queries/__init__.py index 5f9808b7..6ff9f960 100644 --- a/kdb-bot/src/bot_graphql/queries/__init__.py +++ b/kdb-bot/src/bot_graphql/queries/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_graphql/queries/discord/__init__.py b/kdb-bot/src/bot_graphql/queries/discord/__init__.py index fabe11ef..d07eef27 100644 --- a/kdb-bot/src/bot_graphql/queries/discord/__init__.py +++ b/kdb-bot/src/bot_graphql/queries/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/bot_graphql/queries/discord/channel_query.py b/kdb-bot/src/bot_graphql/queries/discord/channel_query.py index 56807d5e..b40f1b07 100644 --- a/kdb-bot/src/bot_graphql/queries/discord/channel_query.py +++ b/kdb-bot/src/bot_graphql/queries/discord/channel_query.py @@ -1,10 +1,10 @@ -from bot_graphql.abc.data_query_abc import DataQueryABC +from bot_graphql.abc.query_abc import QueryABC -class ChannelQuery(DataQueryABC): +class ChannelQuery(QueryABC): def __init__(self): - DataQueryABC.__init__(self, "Channel") + QueryABC.__init__(self, "Channel") self.set_field("id", lambda c, *_: c.id) self.set_field("name", lambda c, *_: c.name) - self.set_field("type", lambda c, *_: type(c)) + self.set_field("type", lambda c, *_: type(c).__name__) diff --git a/kdb-bot/src/bot_graphql/queries/discord/discord_query.py b/kdb-bot/src/bot_graphql/queries/discord/discord_query.py new file mode 100644 index 00000000..a5b01f24 --- /dev/null +++ b/kdb-bot/src/bot_graphql/queries/discord/discord_query.py @@ -0,0 +1,48 @@ +from cpl_discord.service import DiscordBotServiceABC +from cpl_query.extension import List + +from bot_graphql.abc.query_abc import QueryABC + + +class DiscordQuery(QueryABC): + def __init__( + self, + bot: DiscordBotServiceABC, + ): + QueryABC.__init__(self, "Discord") + + self._bot = bot + + self.set_field("guilds", self._resolve_guilds) + self.set_field("users", self._resolve_users) + + def _resolve_guilds(self, *_, filter=None): + guilds = self._bot.guilds + + if filter is None: + return guilds + + if "id" in filter: + guilds = self._bot.guilds.where(lambda g: g.id == int(filter["id"])) + + if "name" in filter: + guilds = self._bot.guilds.where(lambda g: g.name == filter["name"]) + + return guilds + + def _resolve_users(self, *_, filter=None): + users = List(any).extend(self._bot.users) + + if filter is None: + return users + + if "id" in filter: + users = users.where(lambda g: g.id == int(filter["id"])) + + if "name" in filter: + users = users.where(lambda g: g.name == filter["name"]) + + if "bot" in filter: + users = users.where(lambda g: g.bot == bool(filter["bot"])) + + return users diff --git a/kdb-bot/src/bot_graphql/queries/discord/discord_user_query.py b/kdb-bot/src/bot_graphql/queries/discord/discord_user_query.py new file mode 100644 index 00000000..5a9b61f4 --- /dev/null +++ b/kdb-bot/src/bot_graphql/queries/discord/discord_user_query.py @@ -0,0 +1,10 @@ +from bot_graphql.abc.query_abc import QueryABC + + +class DiscordUserQuery(QueryABC): + def __init__(self): + QueryABC.__init__(self, "DiscordUser") + + self.set_field("id", lambda r, *_: r.id) + self.set_field("name", lambda r, *_: r.name) + self.set_field("bot", lambda r, *_: r.bot) diff --git a/kdb-bot/src/bot_graphql/queries/discord/emoji_query.py b/kdb-bot/src/bot_graphql/queries/discord/emoji_query.py index 3c776a9d..853572d0 100644 --- a/kdb-bot/src/bot_graphql/queries/discord/emoji_query.py +++ b/kdb-bot/src/bot_graphql/queries/discord/emoji_query.py @@ -1,9 +1,9 @@ -from bot_graphql.abc.data_query_abc import DataQueryABC +from bot_graphql.abc.query_abc import QueryABC -class RoleQuery(DataQueryABC): +class EmojiQuery(QueryABC): def __init__(self): - DataQueryABC.__init__(self, "Emoji") + QueryABC.__init__(self, "Emoji") self.set_field("id", lambda e, *_: e.id) self.set_field("name", lambda e, *_: e.name) diff --git a/kdb-bot/src/bot_graphql/queries/discord/guild_query.py b/kdb-bot/src/bot_graphql/queries/discord/guild_query.py index f963e999..95b87b08 100644 --- a/kdb-bot/src/bot_graphql/queries/discord/guild_query.py +++ b/kdb-bot/src/bot_graphql/queries/discord/guild_query.py @@ -1,12 +1,38 @@ -from bot_graphql.abc.data_query_abc import DataQueryABC +from cpl_discord.service import DiscordBotServiceABC +from cpl_query.extension import List +from discord import Guild + +from bot_graphql.abc.query_abc import QueryABC -class GuildQuery(DataQueryABC): - def __init__(self): - DataQueryABC.__init__(self, "Guild") +class GuildQuery(QueryABC): + def __init__( + self, + bot: DiscordBotServiceABC, + ): + QueryABC.__init__(self, "Guild") + + self._bot = bot self.set_field("id", lambda g, *_: g.id) self.set_field("name", lambda g, *_: g.name) - self.set_field("channels", lambda g, *_: g.channels) + self.set_field("channels", self._resolve_channels) self.set_field("roles", lambda g, *_: g.roles) self.set_field("emojis", lambda g, *_: g.emojis) + + def _resolve_channels(self, g: Guild, *_, filter=None): + users = List(any).extend(g.channels) + + if filter is None: + return users + + if "id" in filter: + users = users.where(lambda c: c.id == int(filter["id"])) + + if "name" in filter: + users = users.where(lambda c: c.id == filter["name"]) + + if "type" in filter: + users = users.where(lambda c: type(c).__name__ == filter["type"]) + + return users diff --git a/kdb-bot/src/bot_graphql/queries/discord/role_query.py b/kdb-bot/src/bot_graphql/queries/discord/role_query.py index 6880ed4f..f7efae9e 100644 --- a/kdb-bot/src/bot_graphql/queries/discord/role_query.py +++ b/kdb-bot/src/bot_graphql/queries/discord/role_query.py @@ -1,9 +1,9 @@ -from bot_graphql.abc.data_query_abc import DataQueryABC +from bot_graphql.abc.query_abc import QueryABC -class RoleQuery(DataQueryABC): +class RoleQuery(QueryABC): def __init__(self): - DataQueryABC.__init__(self, "Role") + QueryABC.__init__(self, "Role") self.set_field("id", lambda r, *_: r.id) self.set_field("name", lambda r, *_: r.name) diff --git a/kdb-bot/src/bot_graphql/query.py b/kdb-bot/src/bot_graphql/query.py index 7ec97aee..69e5553e 100644 --- a/kdb-bot/src/bot_graphql/query.py +++ b/kdb-bot/src/bot_graphql/query.py @@ -1,4 +1,5 @@ from cpl_discord.service import DiscordBotServiceABC +from cpl_query.extension import List from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_data.abc.achievement_repository_abc import AchievementRepositoryABC @@ -24,6 +25,7 @@ from bot_graphql.filter.user_filter import UserFilter from bot_graphql.filter.user_joined_game_server_filter import UserJoinedGameServerFilter from bot_graphql.filter.user_joined_server_filter import UserJoinedServerFilter from bot_graphql.filter.user_joined_voice_channel_filter import UserJoinedVoiceChannelFilter +from bot_graphql.model.discord import Discord from modules.achievements.achievement_service import AchievementService @@ -47,8 +49,6 @@ class Query(QueryABC): ): QueryABC.__init__(self, "Query") - self._bot = bot - self.add_collection("autoRole", lambda *_: auto_roles.get_auto_roles(), AutoRoleFilter) self.add_collection("autoRoleRule", lambda *_: auto_roles.get_auto_role_rules(), AutoRoleRuleFilter) self.add_collection("client", lambda *_: clients.get_clients(), ClientFilter) @@ -73,13 +73,7 @@ class Query(QueryABC): self.add_collection("achievement", lambda *_: achievements.get_achievements(), AchievementFilter) self.set_field("technicianConfig", lambda *_: technician_config.get_technician_config()) - self.set_field("guilds", self._resolve_guilds) - self.set_field("achievementAttributes", lambda x, *_: achievement_service.get_attributes()) - self.set_field("achievementOperators", lambda x, *_: achievement_service.get_operators()) - self.set_field("possibleFeatureFlags", lambda x, *_: [e.value for e in FeatureFlagsEnum]) - - def _resolve_guilds(self, *_, filter=None): - if filter is None or "id" not in filter: - return self._bot.guilds - - return self._bot.guilds.where(lambda g: g.id == int(filter["id"])) + self.set_field("achievementAttributes", lambda *_: achievement_service.get_attributes()) + self.set_field("achievementOperators", lambda *_: achievement_service.get_operators()) + self.set_field("possibleFeatureFlags", lambda *_: [e.value for e in FeatureFlagsEnum]) + self.set_field("discord", lambda *_: Discord(bot.guilds, List(any).extend(bot.users))) diff --git a/kdb-bot/src/bot_graphql/schema.py b/kdb-bot/src/bot_graphql/schema.py index d2972a78..020efbc8 100644 --- a/kdb-bot/src/bot_graphql/schema.py +++ b/kdb-bot/src/bot_graphql/schema.py @@ -10,7 +10,7 @@ from bot_graphql.query import Query class Schema: def __init__(self, query: Query, mutation: Mutation, queries: list[QueryABC]): - type_defs = load_schema_from_path(os.path.join(os.path.dirname(os.path.realpath(__file__)), "model/")) + type_defs = load_schema_from_path(os.path.join(os.path.dirname(os.path.realpath(__file__)), "graphql/")) self._schema = make_executable_schema(type_defs, query, mutation, *queries) @property diff --git a/kdb-bot/src/modules/achievements/__init__.py b/kdb-bot/src/modules/achievements/__init__.py index b14676b8..4c49b7c6 100644 --- a/kdb-bot/src/modules/achievements/__init__.py +++ b/kdb-bot/src/modules/achievements/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/achievements/achievements.json b/kdb-bot/src/modules/achievements/achievements.json index 29ef98b2..51938122 100644 --- a/kdb-bot/src/modules/achievements/achievements.json +++ b/kdb-bot/src/modules/achievements/achievements.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", @@ -16,10 +16,10 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=1.1.0.rc3" + "cpl-core>=1.1.0.rc4" ], "DevDependencies": [ - "cpl-cli>=1.1.0.rc3" + "cpl-cli>=1.1.0.rc4" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/kdb-bot/src/modules/achievements/commands/__init__.py b/kdb-bot/src/modules/achievements/commands/__init__.py index 72e7b6cc..28dc1c82 100644 --- a/kdb-bot/src/modules/achievements/commands/__init__.py +++ b/kdb-bot/src/modules/achievements/commands/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.commands" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/achievements/events/__init__.py b/kdb-bot/src/modules/achievements/events/__init__.py index 5206e732..ceb80d33 100644 --- a/kdb-bot/src/modules/achievements/events/__init__.py +++ b/kdb-bot/src/modules/achievements/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py index f489bb08..dad3a8f1 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py @@ -53,7 +53,7 @@ class AchievementOnReactionAddEvent(OnReactionAddABC): return server = self._servers.get_server_by_discord_id(user.guild.id) - user = self._users.get_user_by_discord_id_and_server_id(user.author.id, server.id) + user = self._users.get_user_by_discord_id_and_server_id(user.id, server.id) user.reaction_count += 1 self._db.save_changes() diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py index 4efb5588..db953ed3 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py @@ -53,7 +53,7 @@ class AchievementOnReactionRemoveEvent(OnReactionRemoveABC): return server = self._servers.get_server_by_discord_id(user.guild.id) - user = self._users.get_user_by_discord_id_and_server_id(user.author.id, server.id) + user = self._users.get_user_by_discord_id_and_server_id(user.id, server.id) user.reaction_count -= 1 self._db.save_changes() diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_voice_state_update_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_voice_state_update_event.py index 307d4e18..2d9417a1 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_voice_state_update_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_voice_state_update_event.py @@ -50,6 +50,6 @@ class AchievementOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC): return server = self._servers.get_server_by_discord_id(member.guild.id) - user = self._users.get_user_by_discord_id_and_server_id(member.author.id, server.id) + user = self._users.get_user_by_discord_id_and_server_id(member.id, server.id) await self._achievements.validate_achievements_for_user(user) diff --git a/kdb-bot/src/modules/achievements/model/__init__.py b/kdb-bot/src/modules/achievements/model/__init__.py index 25fccca9..d05494ec 100644 --- a/kdb-bot/src/modules/achievements/model/__init__.py +++ b/kdb-bot/src/modules/achievements/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/auto_role/__init__.py b/kdb-bot/src/modules/auto_role/__init__.py index fc1a64b8..b9cf4ba5 100644 --- a/kdb-bot/src/modules/auto_role/__init__.py +++ b/kdb-bot/src/modules/auto_role/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/auto_role/auto-role.json b/kdb-bot/src/modules/auto_role/auto-role.json index 611d587b..2065290b 100644 --- a/kdb-bot/src/modules/auto_role/auto-role.json +++ b/kdb-bot/src/modules/auto_role/auto-role.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/auto_role/command/__init__.py b/kdb-bot/src/modules/auto_role/command/__init__.py index f7dd69a3..4a4fe3cc 100644 --- a/kdb-bot/src/modules/auto_role/command/__init__.py +++ b/kdb-bot/src/modules/auto_role/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/auto_role/events/__init__.py b/kdb-bot/src/modules/auto_role/events/__init__.py index f1e6f4bf..c23aded8 100644 --- a/kdb-bot/src/modules/auto_role/events/__init__.py +++ b/kdb-bot/src/modules/auto_role/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/auto_role/helper/__init__.py b/kdb-bot/src/modules/auto_role/helper/__init__.py index 45e5d7bc..0f72339f 100644 --- a/kdb-bot/src/modules/auto_role/helper/__init__.py +++ b/kdb-bot/src/modules/auto_role/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/base/__init__.py b/kdb-bot/src/modules/base/__init__.py index b33e3f94..f934f50e 100644 --- a/kdb-bot/src/modules/base/__init__.py +++ b/kdb-bot/src/modules/base/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/base/base.json b/kdb-bot/src/modules/base/base.json index 97fe8006..f2981dea 100644 --- a/kdb-bot/src/modules/base/base.json +++ b/kdb-bot/src/modules/base/base.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/base/base_module.py b/kdb-bot/src/modules/base/base_module.py index 1e2412d1..4c4c5e5f 100644 --- a/kdb-bot/src/modules/base/base_module.py +++ b/kdb-bot/src/modules/base/base_module.py @@ -10,6 +10,7 @@ from modules.base.command.afk_command import AFKCommand from modules.base.command.game_server_group import GameServerGroup from modules.base.command.help_command import HelpCommand from modules.base.command.info_command import InfoCommand +from modules.base.command.make_coffee_command import MakeCoffeeCommand from modules.base.command.mass_move_command import MassMoveCommand from modules.base.command.ping_command import PingCommand from modules.base.command.presence_command import PresenceCommand @@ -67,6 +68,7 @@ class BaseModule(ModuleABC): self._dc.add_command(MassMoveCommand) self._dc.add_command(PingCommand) self._dc.add_command(PresenceCommand) + self._dc.add_command(MakeCoffeeCommand) self._dc.add_command(PurgeCommand) self._dc.add_command(UserGroup) diff --git a/kdb-bot/src/modules/base/command/__init__.py b/kdb-bot/src/modules/base/command/__init__.py index c67b76cd..0003f531 100644 --- a/kdb-bot/src/modules/base/command/__init__.py +++ b/kdb-bot/src/modules/base/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/base/command/make_coffee_command.py b/kdb-bot/src/modules/base/command/make_coffee_command.py new file mode 100644 index 00000000..d1c96de4 --- /dev/null +++ b/kdb-bot/src/modules/base/command/make_coffee_command.py @@ -0,0 +1,17 @@ +from cpl_core.logging import LoggerABC +from cpl_discord.command import DiscordCommandABC +from cpl_discord.service import DiscordBotServiceABC +from discord.ext import commands +from discord.ext.commands import Context + + +class MakeCoffeeCommand(DiscordCommandABC): + def __init__(self, logger: LoggerABC, bot: DiscordBotServiceABC): + DiscordCommandABC.__init__(self) + + self._logger = logger + self._bot = bot + + @commands.hybrid_command(name="make-coffee") + async def make_coffee(self, ctx: Context): + await ctx.send("https://media.giphy.com/media/M4ecx9P2jI4tq/giphy.gif") diff --git a/kdb-bot/src/modules/base/events/__init__.py b/kdb-bot/src/modules/base/events/__init__.py index 2498a618..19675745 100644 --- a/kdb-bot/src/modules/base/events/__init__.py +++ b/kdb-bot/src/modules/base/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/base/forms/__init__.py b/kdb-bot/src/modules/base/forms/__init__.py index 283ca24d..0d9b4fa8 100644 --- a/kdb-bot/src/modules/base/forms/__init__.py +++ b/kdb-bot/src/modules/base/forms/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.forms" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/base/helper/__init__.py b/kdb-bot/src/modules/base/helper/__init__.py index f04c0277..0fe12328 100644 --- a/kdb-bot/src/modules/base/helper/__init__.py +++ b/kdb-bot/src/modules/base/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/base/model/__init__.py b/kdb-bot/src/modules/base/model/__init__.py index 5e758a28..f18cd8c6 100644 --- a/kdb-bot/src/modules/base/model/__init__.py +++ b/kdb-bot/src/modules/base/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/base/service/__init__.py b/kdb-bot/src/modules/base/service/__init__.py index 1afdc87e..108babfc 100644 --- a/kdb-bot/src/modules/base/service/__init__.py +++ b/kdb-bot/src/modules/base/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/base/thread/__init__.py b/kdb-bot/src/modules/base/thread/__init__.py index 7108fd89..ac8864f8 100644 --- a/kdb-bot/src/modules/base/thread/__init__.py +++ b/kdb-bot/src/modules/base/thread/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.thread" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/boot_log/__init__.py b/kdb-bot/src/modules/boot_log/__init__.py index 17ed06e1..8d280a57 100644 --- a/kdb-bot/src/modules/boot_log/__init__.py +++ b/kdb-bot/src/modules/boot_log/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.boot_log" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/boot_log/boot-log.json b/kdb-bot/src/modules/boot_log/boot-log.json index 1687845f..fa29fafd 100644 --- a/kdb-bot/src/modules/boot_log/boot-log.json +++ b/kdb-bot/src/modules/boot_log/boot-log.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/config/__init__.py b/kdb-bot/src/modules/config/__init__.py index 2758727c..c8d6bd90 100644 --- a/kdb-bot/src/modules/config/__init__.py +++ b/kdb-bot/src/modules/config/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/config/config.json b/kdb-bot/src/modules/config/config.json index 1226a7c9..c612f40c 100644 --- a/kdb-bot/src/modules/config/config.json +++ b/kdb-bot/src/modules/config/config.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "", "AuthorEmail": "", @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=1.1.0.rc3" + "cpl-core>=1.1.0.rc4" ], "DevDependencies": [ - "cpl-cli>=1.1.0.rc3" + "cpl-cli>=1.1.0.rc4" ], "PythonVersion": ">=3.10.4", "PythonPath": { diff --git a/kdb-bot/src/modules/config/events/__init__.py b/kdb-bot/src/modules/config/events/__init__.py index 446398ad..fe32afa5 100644 --- a/kdb-bot/src/modules/config/events/__init__.py +++ b/kdb-bot/src/modules/config/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/config/service/__init__.py b/kdb-bot/src/modules/config/service/__init__.py index 6d85bf33..70183c4c 100644 --- a/kdb-bot/src/modules/config/service/__init__.py +++ b/kdb-bot/src/modules/config/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/database/__init__.py b/kdb-bot/src/modules/database/__init__.py index 7ec11049..559302b7 100644 --- a/kdb-bot/src/modules/database/__init__.py +++ b/kdb-bot/src/modules/database/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.database" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/database/database.json b/kdb-bot/src/modules/database/database.json index a2fd999d..561aaf48 100644 --- a/kdb-bot/src/modules/database/database.json +++ b/kdb-bot/src/modules/database/database.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/modules/level/__init__.py b/kdb-bot/src/modules/level/__init__.py index 78b769f9..89e11790 100644 --- a/kdb-bot/src/modules/level/__init__.py +++ b/kdb-bot/src/modules/level/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/level/command/__init__.py b/kdb-bot/src/modules/level/command/__init__.py index 1f6d60c8..5d25881f 100644 --- a/kdb-bot/src/modules/level/command/__init__.py +++ b/kdb-bot/src/modules/level/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/level/configuration/__init__.py b/kdb-bot/src/modules/level/configuration/__init__.py index 27b2115e..fabe6eb9 100644 --- a/kdb-bot/src/modules/level/configuration/__init__.py +++ b/kdb-bot/src/modules/level/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/level/events/__init__.py b/kdb-bot/src/modules/level/events/__init__.py index 8cff79a0..2a8224e7 100644 --- a/kdb-bot/src/modules/level/events/__init__.py +++ b/kdb-bot/src/modules/level/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/level/level.json b/kdb-bot/src/modules/level/level.json index 95983d55..d9fcc470 100644 --- a/kdb-bot/src/modules/level/level.json +++ b/kdb-bot/src/modules/level/level.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/level/service/__init__.py b/kdb-bot/src/modules/level/service/__init__.py index 971c4994..8c13f737 100644 --- a/kdb-bot/src/modules/level/service/__init__.py +++ b/kdb-bot/src/modules/level/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/permission/__init__.py b/kdb-bot/src/modules/permission/__init__.py index 4dd28e12..bf962ec5 100644 --- a/kdb-bot/src/modules/permission/__init__.py +++ b/kdb-bot/src/modules/permission/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.permission" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/permission/abc/__init__.py b/kdb-bot/src/modules/permission/abc/__init__.py index 46219996..7ba9c384 100644 --- a/kdb-bot/src/modules/permission/abc/__init__.py +++ b/kdb-bot/src/modules/permission/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.permission.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/permission/events/__init__.py b/kdb-bot/src/modules/permission/events/__init__.py index 7aceaac0..4df8faf4 100644 --- a/kdb-bot/src/modules/permission/events/__init__.py +++ b/kdb-bot/src/modules/permission/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.permission.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/permission/permission.json b/kdb-bot/src/modules/permission/permission.json index 3d0a48b4..0d6b42f6 100644 --- a/kdb-bot/src/modules/permission/permission.json +++ b/kdb-bot/src/modules/permission/permission.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/permission/service/__init__.py b/kdb-bot/src/modules/permission/service/__init__.py index 0ef9441e..27e838bb 100644 --- a/kdb-bot/src/modules/permission/service/__init__.py +++ b/kdb-bot/src/modules/permission/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.permission.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/technician/__init__.py b/kdb-bot/src/modules/technician/__init__.py index 2e051b1d..7097f90b 100644 --- a/kdb-bot/src/modules/technician/__init__.py +++ b/kdb-bot/src/modules/technician/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.technician" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/technician/command/__init__.py b/kdb-bot/src/modules/technician/command/__init__.py index 34016ee7..77248944 100644 --- a/kdb-bot/src/modules/technician/command/__init__.py +++ b/kdb-bot/src/modules/technician/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.technician.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.0rc3" +__version__ = "1.1.0rc4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="1", micro="0.rc3") +version_info = VersionInfo(major="1", minor="1", micro="0.rc4") diff --git a/kdb-bot/src/modules/technician/technician.json b/kdb-bot/src/modules/technician/technician.json index 787f7c9f..33307dc7 100644 --- a/kdb-bot/src/modules/technician/technician.json +++ b/kdb-bot/src/modules/technician/technician.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/tools/checks/checks.json b/kdb-bot/tools/checks/checks.json index 9a05a399..5c328d55 100644 --- a/kdb-bot/tools/checks/checks.json +++ b/kdb-bot/tools/checks/checks.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/tools/get_version/get-version.json b/kdb-bot/tools/get_version/get-version.json index 5069e535..9ddac2cf 100644 --- a/kdb-bot/tools/get_version/get-version.json +++ b/kdb-bot/tools/get_version/get-version.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/tools/post_build/post-build.json b/kdb-bot/tools/post_build/post-build.json index a8917bab..9171627a 100644 --- a/kdb-bot/tools/post_build/post-build.json +++ b/kdb-bot/tools/post_build/post-build.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/tools/set_version/set-version.json b/kdb-bot/tools/set_version/set-version.json index 56ca78a3..0064ea65 100644 --- a/kdb-bot/tools/set_version/set-version.json +++ b/kdb-bot/tools/set_version/set-version.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "1", - "Micro": "0.rc3" + "Micro": "0.rc4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-web/package.json b/kdb-web/package.json index aca808cd..32db2791 100644 --- a/kdb-web/package.json +++ b/kdb-web/package.json @@ -1,6 +1,6 @@ { "name": "kdb-web", - "version": "1.1.0.rc3", + "version": "1.1.0.rc4", "scripts": { "ng": "ng", "update-version": "ts-node-esm update-version.ts", diff --git a/kdb-web/src/app/models/data/discord.model.ts b/kdb-web/src/app/models/data/discord.model.ts index 680225ef..6e640052 100644 --- a/kdb-web/src/app/models/data/discord.model.ts +++ b/kdb-web/src/app/models/data/discord.model.ts @@ -1,3 +1,8 @@ +export interface Discord { + guilds?: Guild[]; + users?: DiscordUser[]; +} + export interface Guild { id?: string; name?: string; @@ -14,9 +19,9 @@ export interface Channel { } export enum ChannelType { - category = "category", - text = "text", - voice = "voice" + category = "CategoryChannel", + text = "TextChannel", + voice = "VoiceChannel" } export interface Role { @@ -29,3 +34,9 @@ export interface Emoji { name?: string; url?: string; } + +export interface DiscordUser { + id?: string; + name?: string; + bot?: boolean; +} diff --git a/kdb-web/src/app/models/graphql/queries.model.ts b/kdb-web/src/app/models/graphql/queries.model.ts index 7e7e212f..28729570 100644 --- a/kdb-web/src/app/models/graphql/queries.model.ts +++ b/kdb-web/src/app/models/graphql/queries.model.ts @@ -1,24 +1,59 @@ export class Queries { static guildsQuery = ` - query GuildsQuery($id: ID) { - guilds(filter: {id: $id}) { - id - name + query GuildsQuery($id: ID, $filter: ChannelFilter) { + discord { + guilds(filter: {id: $id}) { + id + name - channels { - id - name - type + channels(filter: $filter) { + id + name + type + } + roles { + id + name + } + emojis { + id + name + url + } } - roles { + } + } + `; + + static discordUsersQuery = ` + query DiscordUsersQuery { + discord { + users { id name } - emojis { + } + } + `; + + static serverConfigDiscordQuery = ` + query ServerConfigDiscordQuery($id: ID) { + discord { + guilds(filter: {id: $id}) { id name - url + + roles { + id + name + } + + channels { + id + name + type + } } } } @@ -29,10 +64,11 @@ export class Queries { serverCount servers(filter: $filter, page: $page, sort: $sort) { id + discordId name iconURL userCount - clients{ + clients { id discordId name diff --git a/kdb-web/src/app/models/graphql/query.model.ts b/kdb-web/src/app/models/graphql/query.model.ts index 12b5ddaa..fe0c9683 100644 --- a/kdb-web/src/app/models/graphql/query.model.ts +++ b/kdb-web/src/app/models/graphql/query.model.ts @@ -1,7 +1,7 @@ import { GameServer, Server } from "../data/server.model"; import { User } from "../data/user.model"; import { AutoRole, AutoRoleRule } from "../data/auto_role.model"; -import { Guild } from "../data/discord.model"; +import { Discord, Guild } from "../data/discord.model"; import { Level } from "../data/level.model"; import { Achievement, AchievementAttribute } from "../data/achievement.model"; import { TechnicianConfig } from "../config/technician-config.model"; @@ -21,7 +21,7 @@ export interface ServerConfigQuery { } export interface SingleDiscordQuery { - guilds: Guild[]; + discord: Discord; } export interface UserListQuery { diff --git a/kdb-web/src/app/modules/admin/settings/components/settings/settings.component.html b/kdb-web/src/app/modules/admin/settings/components/settings/settings.component.html index 7887819d..121cdc0f 100644 --- a/kdb-web/src/app/modules/admin/settings/components/settings/settings.component.html +++ b/kdb-web/src/app/modules/admin/settings/components/settings/settings.component.html @@ -135,34 +135,43 @@