From 77e079d91c4365c1ba28025681ed4116225de104 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 07:16:50 +0200 Subject: [PATCH 01/24] Fixed config for new servers --- kdb-bot/src/bot_data/service/server_config_seeder.py | 1 + 1 file changed, 1 insertion(+) diff --git a/kdb-bot/src/bot_data/service/server_config_seeder.py b/kdb-bot/src/bot_data/service/server_config_seeder.py index 926c09b4..d7711783 100644 --- a/kdb-bot/src/bot_data/service/server_config_seeder.py +++ b/kdb-bot/src/bot_data/service/server_config_seeder.py @@ -48,6 +48,7 @@ class ServerConfigSeeder(DataSeederABC): guild.system_channel.id, guild.system_channel.id, guild.system_channel.id, + guild.default_role.id, {}, server, [], -- 2.45.2 From 0037a30c11a4f71904ac5cb654ce19be7c5eed2c Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 07:31:08 +0200 Subject: [PATCH 02/24] Fixed discord data orders --- .../queries/discord/guild_query.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 95b87b08..98f581f3 100644 --- a/kdb-bot/src/bot_graphql/queries/discord/guild_query.py +++ b/kdb-bot/src/bot_graphql/queries/discord/guild_query.py @@ -1,3 +1,4 @@ +import discord from cpl_discord.service import DiscordBotServiceABC from cpl_query.extension import List from discord import Guild @@ -17,22 +18,24 @@ class GuildQuery(QueryABC): self.set_field("id", lambda g, *_: g.id) self.set_field("name", lambda g, *_: g.name) self.set_field("channels", self._resolve_channels) - self.set_field("roles", lambda g, *_: g.roles) - self.set_field("emojis", lambda g, *_: g.emojis) + self.set_field("roles", lambda g, *_: g.roles.order_by(lambda x: x.position)) + self.set_field( + "emojis", lambda g, *_: List(discord.Emoji, g.emojis).order_by_descending(lambda x: x.created_at) + ) def _resolve_channels(self, g: Guild, *_, filter=None): - users = List(any).extend(g.channels) + channels = List(any).extend(g.channels) if filter is None: - return users + return channels if "id" in filter: - users = users.where(lambda c: c.id == int(filter["id"])) + channels = channels.where(lambda c: c.id == int(filter["id"])) if "name" in filter: - users = users.where(lambda c: c.id == filter["name"]) + channels = channels.where(lambda c: c.id == filter["name"]) if "type" in filter: - users = users.where(lambda c: type(c).__name__ == filter["type"]) + channels = channels.where(lambda c: type(c).__name__ == filter["type"]) - return users + return channels.order_by(lambda x: x.position) -- 2.45.2 From 957a54ccf356991b261c88b3467d2377c64e501b Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 07:40:09 +0200 Subject: [PATCH 03/24] Set new version --- kdb-bot/src/bot/__init__.py | 4 ++-- kdb-bot/src/bot/bot.json | 2 +- kdb-bot/src/bot/extension/__init__.py | 4 ++-- kdb-bot/src/bot_api/__init__.py | 4 ++-- kdb-bot/src/bot_api/abc/__init__.py | 4 ++-- kdb-bot/src/bot_api/bot-api.json | 2 +- kdb-bot/src/bot_api/configuration/__init__.py | 4 ++-- kdb-bot/src/bot_api/controller/__init__.py | 4 ++-- kdb-bot/src/bot_api/event/__init__.py | 4 ++-- kdb-bot/src/bot_api/exception/__init__.py | 4 ++-- kdb-bot/src/bot_api/filter/__init__.py | 4 ++-- kdb-bot/src/bot_api/filter/discord/__init__.py | 4 ++-- kdb-bot/src/bot_api/logging/__init__.py | 4 ++-- kdb-bot/src/bot_api/model/__init__.py | 4 ++-- kdb-bot/src/bot_api/model/discord/__init__.py | 4 ++-- kdb-bot/src/bot_api/route/__init__.py | 4 ++-- kdb-bot/src/bot_api/service/__init__.py | 4 ++-- kdb-bot/src/bot_api/transformer/__init__.py | 4 ++-- kdb-bot/src/bot_core/__init__.py | 4 ++-- kdb-bot/src/bot_core/abc/__init__.py | 4 ++-- kdb-bot/src/bot_core/bot-core.json | 2 +- kdb-bot/src/bot_core/configuration/__init__.py | 4 ++-- kdb-bot/src/bot_core/core_extension/__init__.py | 4 ++-- kdb-bot/src/bot_core/events/__init__.py | 4 ++-- kdb-bot/src/bot_core/exception/__init__.py | 4 ++-- kdb-bot/src/bot_core/helper/__init__.py | 4 ++-- kdb-bot/src/bot_core/logging/__init__.py | 4 ++-- kdb-bot/src/bot_core/pipes/__init__.py | 4 ++-- kdb-bot/src/bot_core/service/__init__.py | 4 ++-- kdb-bot/src/bot_data/__init__.py | 4 ++-- kdb-bot/src/bot_data/abc/__init__.py | 4 ++-- kdb-bot/src/bot_data/bot-data.json | 2 +- kdb-bot/src/bot_data/migration/__init__.py | 4 ++-- kdb-bot/src/bot_data/model/__init__.py | 4 ++-- kdb-bot/src/bot_data/service/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/abc/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/bot-graphql.json | 2 +- kdb-bot/src/bot_graphql/filter/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/model/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/mutations/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/queries/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/queries/discord/__init__.py | 4 ++-- kdb-bot/src/modules/achievements/__init__.py | 4 ++-- kdb-bot/src/modules/achievements/achievements.json | 6 +++--- kdb-bot/src/modules/achievements/commands/__init__.py | 4 ++-- kdb-bot/src/modules/achievements/events/__init__.py | 4 ++-- kdb-bot/src/modules/achievements/model/__init__.py | 4 ++-- kdb-bot/src/modules/auto_role/__init__.py | 4 ++-- kdb-bot/src/modules/auto_role/auto-role.json | 2 +- kdb-bot/src/modules/auto_role/command/__init__.py | 4 ++-- kdb-bot/src/modules/auto_role/events/__init__.py | 4 ++-- kdb-bot/src/modules/auto_role/helper/__init__.py | 4 ++-- kdb-bot/src/modules/base/__init__.py | 4 ++-- kdb-bot/src/modules/base/base.json | 2 +- kdb-bot/src/modules/base/command/__init__.py | 4 ++-- kdb-bot/src/modules/base/events/__init__.py | 4 ++-- kdb-bot/src/modules/base/forms/__init__.py | 4 ++-- kdb-bot/src/modules/base/helper/__init__.py | 4 ++-- kdb-bot/src/modules/base/model/__init__.py | 4 ++-- kdb-bot/src/modules/base/service/__init__.py | 4 ++-- kdb-bot/src/modules/base/thread/__init__.py | 4 ++-- kdb-bot/src/modules/boot_log/__init__.py | 4 ++-- kdb-bot/src/modules/boot_log/boot-log.json | 2 +- kdb-bot/src/modules/config/__init__.py | 4 ++-- kdb-bot/src/modules/config/config.json | 6 +++--- kdb-bot/src/modules/config/events/__init__.py | 4 ++-- kdb-bot/src/modules/config/service/__init__.py | 4 ++-- kdb-bot/src/modules/database/__init__.py | 4 ++-- kdb-bot/src/modules/database/database.json | 2 +- kdb-bot/src/modules/level/__init__.py | 4 ++-- kdb-bot/src/modules/level/command/__init__.py | 4 ++-- kdb-bot/src/modules/level/configuration/__init__.py | 4 ++-- kdb-bot/src/modules/level/events/__init__.py | 4 ++-- kdb-bot/src/modules/level/level.json | 2 +- kdb-bot/src/modules/level/service/__init__.py | 4 ++-- kdb-bot/src/modules/permission/__init__.py | 4 ++-- kdb-bot/src/modules/permission/abc/__init__.py | 4 ++-- kdb-bot/src/modules/permission/events/__init__.py | 4 ++-- kdb-bot/src/modules/permission/permission.json | 2 +- kdb-bot/src/modules/permission/service/__init__.py | 4 ++-- kdb-bot/src/modules/technician/__init__.py | 4 ++-- kdb-bot/src/modules/technician/command/__init__.py | 4 ++-- kdb-bot/src/modules/technician/technician.json | 2 +- kdb-bot/tools/checks/checks.json | 2 +- kdb-bot/tools/get_version/get-version.json | 2 +- kdb-bot/tools/post_build/post-build.json | 2 +- kdb-bot/tools/set_version/set-version.json | 2 +- kdb-web/package.json | 4 ++-- kdb-web/src/assets/version.json | 2 +- 90 files changed, 165 insertions(+), 165 deletions(-) diff --git a/kdb-bot/src/bot/__init__.py b/kdb-bot/src/bot/__init__.py index 2f4dc7ca..ede8577f 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index 9f0c063b..994ad073 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": "6" + "Micro": "7" }, "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 ab1e0d0c..c5b5a820 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/__init__.py b/kdb-bot/src/bot_api/__init__.py index 99edb8d3..3feba43b 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/abc/__init__.py b/kdb-bot/src/bot_api/abc/__init__.py index 45d47bf7..6295fa76 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/bot-api.json b/kdb-bot/src/bot_api/bot-api.json index 6f4d2c1c..90254d8f 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": "6" + "Micro": "7" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/bot_api/configuration/__init__.py b/kdb-bot/src/bot_api/configuration/__init__.py index 70de4cf2..1be9b036 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/controller/__init__.py b/kdb-bot/src/bot_api/controller/__init__.py index 474d7841..43d4debe 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/event/__init__.py b/kdb-bot/src/bot_api/event/__init__.py index 7a3cc29f..67d159e0 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/exception/__init__.py b/kdb-bot/src/bot_api/exception/__init__.py index 55055c27..fbd1d1af 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/filter/__init__.py b/kdb-bot/src/bot_api/filter/__init__.py index 77145c97..3cd7a70b 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/filter/discord/__init__.py b/kdb-bot/src/bot_api/filter/discord/__init__.py index 38245fe3..ef5043c3 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/logging/__init__.py b/kdb-bot/src/bot_api/logging/__init__.py index fcd37e0c..2b2fb040 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/model/__init__.py b/kdb-bot/src/bot_api/model/__init__.py index 4d0b966b..13f14058 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/model/discord/__init__.py b/kdb-bot/src/bot_api/model/discord/__init__.py index d482dff9..2fcf7612 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/route/__init__.py b/kdb-bot/src/bot_api/route/__init__.py index 1e63cbc6..90cca78c 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/service/__init__.py b/kdb-bot/src/bot_api/service/__init__.py index ba7b31ba..14734330 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_api/transformer/__init__.py b/kdb-bot/src/bot_api/transformer/__init__.py index 93e08c87..ff1a50ca 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/__init__.py b/kdb-bot/src/bot_core/__init__.py index c5e0872a..37ebae96 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/abc/__init__.py b/kdb-bot/src/bot_core/abc/__init__.py index 452f6763..2f031d96 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/bot-core.json b/kdb-bot/src/bot_core/bot-core.json index 384e8c4b..e1f636da 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": "6" + "Micro": "7" }, "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 9e8b82e8..3e7307ce 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/core_extension/__init__.py b/kdb-bot/src/bot_core/core_extension/__init__.py index 658eaffc..20e5f3a2 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/events/__init__.py b/kdb-bot/src/bot_core/events/__init__.py index c31d23d0..1a580490 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/exception/__init__.py b/kdb-bot/src/bot_core/exception/__init__.py index 96b2feae..147724d2 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/helper/__init__.py b/kdb-bot/src/bot_core/helper/__init__.py index 79023949..a25650f3 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/logging/__init__.py b/kdb-bot/src/bot_core/logging/__init__.py index 23c4b996..63a1d6c1 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/pipes/__init__.py b/kdb-bot/src/bot_core/pipes/__init__.py index f4b9cbfe..1407519e 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_core/service/__init__.py b/kdb-bot/src/bot_core/service/__init__.py index 8af6564f..b357547b 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_data/__init__.py b/kdb-bot/src/bot_data/__init__.py index cfda6242..52de30a7 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_data/abc/__init__.py b/kdb-bot/src/bot_data/abc/__init__.py index 230338fc..42298b03 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_data/bot-data.json b/kdb-bot/src/bot_data/bot-data.json index a808af01..749bb7ff 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": "6" + "Micro": "7" }, "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 0fdf7f51..f1b0d439 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_data/model/__init__.py b/kdb-bot/src/bot_data/model/__init__.py index b9b6a0e5..1b8062b5 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_data/service/__init__.py b/kdb-bot/src/bot_data/service/__init__.py index 1fac6c5f..9c85ede6 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_graphql/__init__.py b/kdb-bot/src/bot_graphql/__init__.py index 4272d8e2..b4c05a40 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_graphql/abc/__init__.py b/kdb-bot/src/bot_graphql/abc/__init__.py index d723ec75..7591d390 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_graphql/bot-graphql.json b/kdb-bot/src/bot_graphql/bot-graphql.json index d42e532e..823c74db 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": "6" + "Micro": "7" }, "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 00ce8266..03251cd7 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_graphql/model/__init__.py b/kdb-bot/src/bot_graphql/model/__init__.py index 9bacb226..352b217d 100644 --- a/kdb-bot/src/bot_graphql/model/__init__.py +++ b/kdb-bot/src/bot_graphql/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.1.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_graphql/mutations/__init__.py b/kdb-bot/src/bot_graphql/mutations/__init__.py index 09ed2432..36c9b1d4 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_graphql/queries/__init__.py b/kdb-bot/src/bot_graphql/queries/__init__.py index af3a9fdf..562ca85f 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/bot_graphql/queries/discord/__init__.py b/kdb-bot/src/bot_graphql/queries/discord/__init__.py index a4425748..2b0d1392 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/achievements/__init__.py b/kdb-bot/src/modules/achievements/__init__.py index eda08773..3ecdbb84 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/achievements/achievements.json b/kdb-bot/src/modules/achievements/achievements.json index e11f0f63..e7e12564 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": "6" + "Micro": "7" }, "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.1" + "cpl-core>=1.1.7" ], "DevDependencies": [ - "cpl-cli>=1.1.1" + "cpl-cli>=1.1.7" ], "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 dbff52dc..c39610da 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/achievements/events/__init__.py b/kdb-bot/src/modules/achievements/events/__init__.py index dfaa74e8..f4bc173e 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/achievements/model/__init__.py b/kdb-bot/src/modules/achievements/model/__init__.py index d803c190..06480608 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/auto_role/__init__.py b/kdb-bot/src/modules/auto_role/__init__.py index 47815bd7..693049f1 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/auto_role/auto-role.json b/kdb-bot/src/modules/auto_role/auto-role.json index 4609845a..1e74a7b0 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": "6" + "Micro": "7" }, "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 9bcc8212..edabf80b 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/auto_role/events/__init__.py b/kdb-bot/src/modules/auto_role/events/__init__.py index a3cbb613..52b00ed4 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/auto_role/helper/__init__.py b/kdb-bot/src/modules/auto_role/helper/__init__.py index 16d38163..2873fa47 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/base/__init__.py b/kdb-bot/src/modules/base/__init__.py index dfc3a901..8f4bf190 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/base/base.json b/kdb-bot/src/modules/base/base.json index c5b462df..a616acc0 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": "6" + "Micro": "7" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/base/command/__init__.py b/kdb-bot/src/modules/base/command/__init__.py index 73da5488..72328115 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/base/events/__init__.py b/kdb-bot/src/modules/base/events/__init__.py index ad93bb83..47a2dcc7 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/base/forms/__init__.py b/kdb-bot/src/modules/base/forms/__init__.py index 340c079a..4a56b8b1 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/base/helper/__init__.py b/kdb-bot/src/modules/base/helper/__init__.py index 4d715c27..f4396c8f 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/base/model/__init__.py b/kdb-bot/src/modules/base/model/__init__.py index aaaa2bd4..b7858460 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/base/service/__init__.py b/kdb-bot/src/modules/base/service/__init__.py index 59c5de9b..be7bcfd1 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/base/thread/__init__.py b/kdb-bot/src/modules/base/thread/__init__.py index daccd3b7..aab792d8 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/boot_log/__init__.py b/kdb-bot/src/modules/boot_log/__init__.py index 37cba8a2..c92a461a 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/boot_log/boot-log.json b/kdb-bot/src/modules/boot_log/boot-log.json index 351f7fbb..25678415 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": "6" + "Micro": "7" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/config/__init__.py b/kdb-bot/src/modules/config/__init__.py index 0330d875..c0009ee8 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/config/config.json b/kdb-bot/src/modules/config/config.json index a0d39cf8..a577cdf4 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": "6" + "Micro": "7" }, "Author": "", "AuthorEmail": "", @@ -16,10 +16,10 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=1.1.1" + "cpl-core>=1.1.7" ], "DevDependencies": [ - "cpl-cli>=1.1.1" + "cpl-cli>=1.1.7" ], "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 a19fb622..27c8915c 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/config/service/__init__.py b/kdb-bot/src/modules/config/service/__init__.py index f3869c77..3c07c0c1 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/database/__init__.py b/kdb-bot/src/modules/database/__init__.py index 4605835b..9003c762 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/database/database.json b/kdb-bot/src/modules/database/database.json index c0f5e616..34652472 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": "6" + "Micro": "7" }, "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 6d650e08..e063f4cb 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/level/command/__init__.py b/kdb-bot/src/modules/level/command/__init__.py index 958058b4..0803c4c8 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/level/configuration/__init__.py b/kdb-bot/src/modules/level/configuration/__init__.py index 1340f77d..a714411a 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/level/events/__init__.py b/kdb-bot/src/modules/level/events/__init__.py index 1c7d6538..9001db43 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/level/level.json b/kdb-bot/src/modules/level/level.json index aac241e5..7f18d235 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": "6" + "Micro": "7" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/level/service/__init__.py b/kdb-bot/src/modules/level/service/__init__.py index baf51d2f..1b4f0b35 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/permission/__init__.py b/kdb-bot/src/modules/permission/__init__.py index 50356dc0..8cb0407e 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/permission/abc/__init__.py b/kdb-bot/src/modules/permission/abc/__init__.py index 4ded6a8e..3ec12c2f 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/permission/events/__init__.py b/kdb-bot/src/modules/permission/events/__init__.py index 046d7be3..57890a9c 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/permission/permission.json b/kdb-bot/src/modules/permission/permission.json index 7b90445a..f8320fdc 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": "6" + "Micro": "7" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/permission/service/__init__.py b/kdb-bot/src/modules/permission/service/__init__.py index 171cdfa0..fd98292f 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/technician/__init__.py b/kdb-bot/src/modules/technician/__init__.py index 0e73eb44..177179d4 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/technician/command/__init__.py b/kdb-bot/src/modules/technician/command/__init__.py index 260f7e77..f175ffff 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.6" +__version__ = "1.1.7" 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="6") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/technician/technician.json b/kdb-bot/src/modules/technician/technician.json index 1fb18154..b970353c 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": "6" + "Micro": "7" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/tools/checks/checks.json b/kdb-bot/tools/checks/checks.json index 343cbdf4..8ffa7472 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": "6" + "Micro": "7" }, "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 c9a5c83b..cbaf1592 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": "6" + "Micro": "7" }, "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 40a46e27..0a81bd0a 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": "6" + "Micro": "7" }, "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 f547987d..e2fed633 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": "6" + "Micro": "7" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-web/package.json b/kdb-web/package.json index c640dd53..027cc595 100644 --- a/kdb-web/package.json +++ b/kdb-web/package.json @@ -1,6 +1,6 @@ { "name": "kdb-web", - "version": "1.1.6", + "version": "1.1.7", "scripts": { "ng": "ng", "update-version": "ts-node update-version.ts", @@ -51,4 +51,4 @@ "tslib": "^2.4.1", "typescript": "~4.9.5" } -} +} \ No newline at end of file diff --git a/kdb-web/src/assets/version.json b/kdb-web/src/assets/version.json index e6fe0a48..ceed4a58 100644 --- a/kdb-web/src/assets/version.json +++ b/kdb-web/src/assets/version.json @@ -2,6 +2,6 @@ "WebVersion": { "Major": "1", "Minor": "1", - "Micro": "6" + "Micro": "7" } } \ No newline at end of file -- 2.45.2 From a8ea9f5e49376a251ff64caa044c79ac073ead54 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 07:51:40 +0200 Subject: [PATCH 04/24] Fixed table add --- .../auth-users/components/auth-user/auth-user.component.ts | 1 - .../components/achievement/achievement.component.ts | 6 +----- .../auto-roles-rules/auto-roles-rules.component.ts | 7 ++----- .../components/auto-roles/auto-roles.component.ts | 5 +---- .../server/levels/components/levels/levels.component.ts | 6 +----- .../app/modules/view/server/members/members.component.ts | 1 - 6 files changed, 5 insertions(+), 21 deletions(-) diff --git a/kdb-web/src/app/modules/admin/auth-users/components/auth-user/auth-user.component.ts b/kdb-web/src/app/modules/admin/auth-users/components/auth-user/auth-user.component.ts index 1dcfceaa..e0df3efb 100644 --- a/kdb-web/src/app/modules/admin/auth-users/components/auth-user/auth-user.component.ts +++ b/kdb-web/src/app/modules/admin/auth-users/components/auth-user/auth-user.component.ts @@ -39,7 +39,6 @@ export class AuthUserComponent extends ComponentWithTable implements OnInit, OnD ]; newUserTemplate: AuthUserDTO = { - id: 0, firstName: "", lastName: "", email: "", diff --git a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts index 127848fd..96625572 100644 --- a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts +++ b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts @@ -193,7 +193,6 @@ export class AchievementComponent extends ComponentWithTable implements OnInit, } public newAchievementTemplate: Achievement = { - id: 0, createdAt: "", modifiedAt: "" }; @@ -303,11 +302,8 @@ export class AchievementComponent extends ComponentWithTable implements OnInit, public addAchievement(table: Table): void { const newAchievement = JSON.parse(JSON.stringify(this.newAchievementTemplate)); - newAchievement.id = this.achievements.length == 0 ? 1 : Math.max.apply(Math, this.achievements.map(l => { - return l.id ?? 0; - })) + 1; - this.achievements.push(newAchievement); + this.achievements = [newAchievement, ...this.achievements]; table.initRowEdit(newAchievement); diff --git a/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles-rules/auto-roles-rules.component.ts b/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles-rules/auto-roles-rules.component.ts index 8ef1cc57..f19a8c2f 100644 --- a/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles-rules/auto-roles-rules.component.ts +++ b/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles-rules/auto-roles-rules.component.ts @@ -1,4 +1,4 @@ -import { Component, OnDestroy, OnInit, Query } from "@angular/core"; +import { Component, OnDestroy, OnInit } from "@angular/core"; import { DataService } from "../../../../../../services/data/data.service"; import { ActivatedRoute, Router } from "@angular/router"; import { AutoRoleRule, AutoRoleRuleFilter } from "../../../../../../models/data/auto_role.model"; @@ -283,11 +283,8 @@ export class AutoRolesRulesComponent extends ComponentWithTable implements OnIni public addAutoRoleRule(table: Table): void { const newAutoRole = JSON.parse(JSON.stringify(this.newAutoRoleTemplate)); - newAutoRole.id = this.rules.length == 0 ? 1 : Math.max.apply(Math, this.rules.map(u => { - return u.id ?? 0; - })) + 1; - this.rules.push(newAutoRole); + this.rules = [newAutoRole, ...this.rules]; table.initRowEdit(newAutoRole); diff --git a/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles/auto-roles.component.ts b/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles/auto-roles.component.ts index 5cb03ec7..7091a167 100644 --- a/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles/auto-roles.component.ts +++ b/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles/auto-roles.component.ts @@ -256,11 +256,8 @@ export class AutoRolesComponent extends ComponentWithTable implements OnInit, On public addAutoRole(table: Table): void { const newAutoRole = JSON.parse(JSON.stringify(this.newAutoRoleTemplate)); - newAutoRole.id = this.auto_roles.length == 0 ? 1 : Math.max.apply(Math, this.auto_roles.map(u => { - return u.id ?? 0; - })) + 1; - this.auto_roles.push(newAutoRole); + this.auto_roles = [newAutoRole, ...this.auto_roles]; table.initRowEdit(newAutoRole); diff --git a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts index 9aba25ea..c1b808b2 100644 --- a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts +++ b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts @@ -144,7 +144,6 @@ export class LevelsComponent extends ComponentWithTable implements OnInit, OnDes } public newLevelTemplate: Level = { - id: 0, createdAt: "", modifiedAt: "" }; @@ -260,11 +259,8 @@ export class LevelsComponent extends ComponentWithTable implements OnInit, OnDes public addLevel(table: Table): void { const newLevel = JSON.parse(JSON.stringify(this.newLevelTemplate)); - newLevel.id = this.levels.length == 0 ? 1 : Math.max.apply(Math, this.levels.map(l => { - return l.id ?? 0; - })) + 1; - this.levels.push(newLevel); + this.levels = [newLevel, ...this.levels]; table.initRowEdit(newLevel); diff --git a/kdb-web/src/app/modules/view/server/members/members.component.ts b/kdb-web/src/app/modules/view/server/members/members.component.ts index 6786adad..bfb65b75 100644 --- a/kdb-web/src/app/modules/view/server/members/members.component.ts +++ b/kdb-web/src/app/modules/view/server/members/members.component.ts @@ -37,7 +37,6 @@ export class MembersComponent extends ComponentWithTable implements OnInit, OnDe isEditingNew: boolean = false; newUserTemplate: User = { - id: 0, discordId: 0, name: "", xp: 0, -- 2.45.2 From 378d2c3dc9ba50cbb6c9a6654a82c0ca2b2ee9fd Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 08:03:27 +0200 Subject: [PATCH 05/24] Added guild join event --- kdb-bot/src/bot_data/model/server_config.py | 24 ++++++++++++ .../bot_data/service/server_config_seeder.py | 25 ++---------- kdb-bot/src/modules/base/base_module.py | 5 +++ .../base/events/base_on_guild_join_event.py | 38 +++++++++++++++++++ 4 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 kdb-bot/src/modules/base/events/base_on_guild_join_event.py diff --git a/kdb-bot/src/bot_data/model/server_config.py b/kdb-bot/src/bot_data/model/server_config.py index 87064e66..86c23ddb 100644 --- a/kdb-bot/src/bot_data/model/server_config.py +++ b/kdb-bot/src/bot_data/model/server_config.py @@ -4,6 +4,7 @@ from datetime import datetime from cpl_core.configuration import ConfigurationModelABC from cpl_core.database import TableABC from cpl_query.extension import List +from discord import Guild from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_data.model.server import Server @@ -59,6 +60,29 @@ class ServerConfig(TableABC, ConfigurationModelABC): self._created_at = created_at if created_at is not None else self._created_at self._modified_at = modified_at if modified_at is not None else self._modified_at + @staticmethod + def new(guild: Guild, server: Server) -> "ServerConfig": + return ServerConfig( + 6, + guild.system_channel.id, + 6, + 1, + 1, + 20, + 10, + 10, + 10, + guild.system_channel.id, + guild.system_channel.id, + guild.system_channel.id, + guild.system_channel.id, + guild.default_role.id, + {}, + server, + List(int), + List(int), + ) + @property def id(self) -> int: return self._id diff --git a/kdb-bot/src/bot_data/service/server_config_seeder.py b/kdb-bot/src/bot_data/service/server_config_seeder.py index d7711783..08450a13 100644 --- a/kdb-bot/src/bot_data/service/server_config_seeder.py +++ b/kdb-bot/src/bot_data/service/server_config_seeder.py @@ -34,31 +34,12 @@ class ServerConfigSeeder(DataSeederABC): if self._server_config.does_server_config_exists(server.id): continue - config = ServerConfig( - 6, - guild.system_channel.id, - 6, - 1, - 1, - 20, - 10, - 10, - 10, - guild.system_channel.id, - guild.system_channel.id, - guild.system_channel.id, - guild.system_channel.id, - guild.default_role.id, - {}, - server, - [], - [], - ) + config = ServerConfig.new(guild, server) self._server_config.add_server_config(config) self._db.save_changes() - self._logger.debug(__name__, "Seeded technician config") + self._logger.debug(__name__, "Seeded server config") except Exception as e: - self._logger.error(__name__, f"Seeding technician config failed", e) + self._logger.error(__name__, f"Seeding server config failed", e) diff --git a/kdb-bot/src/modules/base/base_module.py b/kdb-bot/src/modules/base/base_module.py index 4c4c5e5f..626ea4ef 100644 --- a/kdb-bot/src/modules/base/base_module.py +++ b/kdb-bot/src/modules/base/base_module.py @@ -21,6 +21,7 @@ from modules.base.command.unregister_group import UnregisterGroup from modules.base.command.user_group import UserGroup from modules.base.events.base_on_command_error_event import BaseOnCommandErrorEvent from modules.base.events.base_on_command_event import BaseOnCommandEvent +from modules.base.events.base_on_guild_join_event import BaseOnGuildJoinEvent from modules.base.events.base_on_member_join_event import BaseOnMemberJoinEvent from modules.base.events.base_on_member_remove_event import BaseOnMemberRemoveEvent from modules.base.events.base_on_message_delete_event import BaseOnMessageDeleteEvent @@ -103,3 +104,7 @@ class BaseModule(ModuleABC): DiscordEventTypesEnum.on_scheduled_event_update.value, BaseOnScheduledEventUpdateEvent, ) + self._dc.add_event( + DiscordEventTypesEnum.on_guild_join.value, + BaseOnGuildJoinEvent, + ) diff --git a/kdb-bot/src/modules/base/events/base_on_guild_join_event.py b/kdb-bot/src/modules/base/events/base_on_guild_join_event.py new file mode 100644 index 00000000..4a1582de --- /dev/null +++ b/kdb-bot/src/modules/base/events/base_on_guild_join_event.py @@ -0,0 +1,38 @@ +from cpl_core.database.context import DatabaseContextABC +from cpl_core.logging import LoggerABC +from cpl_discord.events import OnGuildJoinABC +from cpl_discord.service import DiscordBotServiceABC +from discord import Guild + +from bot_data.abc.server_config_repository_abc import ServerConfigRepositoryABC +from bot_data.abc.server_repository_abc import ServerRepositoryABC +from bot_data.model.server import Server +from bot_data.service.seeder_service import SeederService + + +class BaseOnGuildJoinEvent(OnGuildJoinABC): + def __init__( + self, + logger: LoggerABC, + bot: DiscordBotServiceABC, + servers: ServerRepositoryABC, + server_config: ServerConfigRepositoryABC, + db: DatabaseContextABC, + seeder: SeederService, + ): + OnGuildJoinABC.__init__(self) + + self._logger = logger + self._bot = bot + self._servers = servers + self._server_config = server_config + self._db = db + self._seeder = seeder + + async def on_guild_join(self, guild: Guild): + if self._servers.find_server_by_discord_id(guild.id) is None: + self._servers.add_server(Server(guild.id)) + self._db.save_changes() + + await self._seeder.seed() + self._logger.debug(__name__, "Seeded technician config") -- 2.45.2 From d1c79c95b2994e39faae3ba3b932e45ba925ee65 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 08:56:59 +0200 Subject: [PATCH 06/24] Added short role name migration #378 --- .../src/bot/startup_migration_extension.py | 2 + kdb-bot/src/bot_data/abc/migration_abc.py | 20 +++++++++- .../bot_data/migration/config_migration.py | 10 ----- .../db_history_scripts/short_rule_names.sql | 33 ++++++++++++++++ .../migration/short_role_name_migration.py | 38 +++++++++++++++++++ 5 files changed, 91 insertions(+), 12 deletions(-) create mode 100644 kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql create mode 100644 kdb-bot/src/bot_data/migration/short_role_name_migration.py diff --git a/kdb-bot/src/bot/startup_migration_extension.py b/kdb-bot/src/bot/startup_migration_extension.py index b8f9eece..3434344f 100644 --- a/kdb-bot/src/bot/startup_migration_extension.py +++ b/kdb-bot/src/bot/startup_migration_extension.py @@ -16,6 +16,7 @@ from bot_data.migration.default_role_migration import DefaultRoleMigration from bot_data.migration.initial_migration import InitialMigration from bot_data.migration.level_migration import LevelMigration from bot_data.migration.remove_stats_migration import RemoveStatsMigration +from bot_data.migration.short_role_name_migration import ShortRoleNameMigration from bot_data.migration.stats_migration import StatsMigration from bot_data.migration.user_joined_game_server_migration import UserJoinedGameServerMigration from bot_data.migration.user_message_count_per_hour_migration import ( @@ -50,3 +51,4 @@ class StartupMigrationExtension(StartupExtensionABC): services.add_transient(MigrationABC, ConfigMigration) # 19.07.2023 #127 - 1.1.0 services.add_transient(MigrationABC, ConfigFeatureFlagsMigration) # 15.08.2023 #334 - 1.1.0 services.add_transient(MigrationABC, DefaultRoleMigration) # 24.09.2023 #360 - 1.1.3 + services.add_transient(MigrationABC, ShortRoleNameMigration) # 28.09.2023 #378 - 1.1.7 diff --git a/kdb-bot/src/bot_data/abc/migration_abc.py b/kdb-bot/src/bot_data/abc/migration_abc.py index e44e0bc2..d09c52ac 100644 --- a/kdb-bot/src/bot_data/abc/migration_abc.py +++ b/kdb-bot/src/bot_data/abc/migration_abc.py @@ -1,13 +1,20 @@ +import os from abc import ABC, abstractmethod +from cpl_core.dependency_injection import ServiceProviderABC +from mysql.connector.cursor import MySQLCursorBuffered + +from bot_data.db_context import DBContext + class MigrationABC(ABC): name = None prio = 0 @abstractmethod - def __init__(self): - pass + @ServiceProviderABC.inject + def __init__(self, db: DBContext): + self._cursor: MySQLCursorBuffered = db.cursor @abstractmethod def upgrade(self): @@ -16,3 +23,12 @@ class MigrationABC(ABC): @abstractmethod def downgrade(self): pass + + + + def _exec(self, file: str): + path = f"{os.path.dirname(os.path.realpath(__file__))}/db_history_scripts" + sql = open(f"{path}/{file}").read() + + for statement in sql.split("\n\n"): + self._cursor.execute(statement + ";") diff --git a/kdb-bot/src/bot_data/migration/config_migration.py b/kdb-bot/src/bot_data/migration/config_migration.py index 556b396f..7ff33855 100644 --- a/kdb-bot/src/bot_data/migration/config_migration.py +++ b/kdb-bot/src/bot_data/migration/config_migration.py @@ -1,5 +1,3 @@ -import os - from bot_core.logging.database_logger import DatabaseLogger from bot_data.abc.migration_abc import MigrationABC from bot_data.db_context import DBContext @@ -12,14 +10,6 @@ class ConfigMigration(MigrationABC): MigrationABC.__init__(self) self._logger = logger self._db = db - self._cursor = db.cursor - - def _exec(self, file: str): - path = f"{os.path.dirname(os.path.realpath(__file__))}/db_history_scripts" - sql = open(f"{path}/{file}").read() - - for statement in sql.split("\n\n"): - self._cursor.execute(statement + ";") def upgrade(self): self._logger.debug(__name__, "Running upgrade") diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql new file mode 100644 index 00000000..5f5b7f72 --- /dev/null +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql @@ -0,0 +1,33 @@ +CREATE TABLE IF NOT EXISTS `ShortRoleNamesHistory` +( + `Id` BIGINT(20) NOT NULL, + `Name` VARCHAR(64) DEFAULT NULL, + `DiscordRoleId` BIGINT(20) NOT NULL, + `Deleted` BOOL DEFAULT FALSE, + `DateFrom` DATETIME(6) NOT NULL, + `DateTo` DATETIME(6) NOT NULL +); + +DROP TRIGGER IF EXISTS `TR_ShortRoleNamesUpdate`; + +CREATE TRIGGER `TR_ShortRoleNamesUpdate` + AFTER UPDATE + ON `ShortRoleNames` + FOR EACH ROW +BEGIN + INSERT INTO `ShortRoleNamesHistory` (`Id`, `Name`, `DiscordRoleId`, `DateFrom`, `DateTo`) + VALUES (OLD.Id, OLD.Name, OLD.DiscordRoleId, OLD.LastModifiedAt, CURRENT_TIMESTAMP(6)); +END; + +DROP TRIGGER IF EXISTS `TR_ShortRoleNamesDelete`; + +CREATE TRIGGER `TR_ShortRoleNamesDelete` + AFTER DELETE + ON `ShortRoleNames` + FOR EACH ROW +BEGIN + INSERT INTO `ShortRoleNamesHistory` (`Id`, `Name`, `DiscordRoleId`, `Deleted`, `DateFrom`, + `DateTo`) + VALUES (OLD.Id, OLD.Name, OLD.DiscordRoleId, TRUE, OLD.LastModifiedAt, + CURRENT_TIMESTAMP(6)); +END; \ No newline at end of file diff --git a/kdb-bot/src/bot_data/migration/short_role_name_migration.py b/kdb-bot/src/bot_data/migration/short_role_name_migration.py new file mode 100644 index 00000000..4a427b25 --- /dev/null +++ b/kdb-bot/src/bot_data/migration/short_role_name_migration.py @@ -0,0 +1,38 @@ +from bot_core.logging.database_logger import DatabaseLogger +from bot_data.abc.migration_abc import MigrationABC +from bot_data.db_context import DBContext + + +class ShortRoleNameMigration(MigrationABC): + name = "1.1.7_ShortRoleNameMigration" + + def __init__(self, logger: DatabaseLogger, db: DBContext): + MigrationABC.__init__(self) + self._logger = logger + self._db = db + self._cursor = db.cursor + + def upgrade(self): + self._logger.debug(__name__, "Running upgrade") + + self._cursor.execute( + str( + f""" + CREATE TABLE IF NOT EXISTS `ShortRoleNames` ( + `Id` BIGINT NOT NULL AUTO_INCREMENT, + `ShortName` VARCHAR(255) NOT NULL, + `DiscordRoleId` BIGINT NOT NULL, + `ServerId` BIGINT, + `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6), + `LastModifiedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + PRIMARY KEY(`Id`), + FOREIGN KEY (`ServerId`) REFERENCES `Servers`(`ServerId`) + ); + """ + ) + ) + + self._exec("config/short_rule_names.sql") + + def downgrade(self): + self._cursor.execute("DROP TABLE `ShortRoleNames`;") -- 2.45.2 From 5e9cca5b1d6e522030ad60e9622a73c0119d3ee3 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 09:08:52 +0200 Subject: [PATCH 07/24] Added fix migration #378 --- .../src/bot/startup_migration_extension.py | 2 + kdb-bot/src/bot_data/abc/migration_abc.py | 2 - .../db_history_scripts/config/server.sql | 194 +++++++++--------- .../db_history_scripts/config/technician.sql | 87 ++++---- .../migration/fix_updates_migration.py | 22 ++ .../migration/short_role_name_migration.py | 2 +- 6 files changed, 165 insertions(+), 144 deletions(-) create mode 100644 kdb-bot/src/bot_data/migration/fix_updates_migration.py diff --git a/kdb-bot/src/bot/startup_migration_extension.py b/kdb-bot/src/bot/startup_migration_extension.py index 3434344f..527958ae 100644 --- a/kdb-bot/src/bot/startup_migration_extension.py +++ b/kdb-bot/src/bot/startup_migration_extension.py @@ -13,6 +13,7 @@ from bot_data.migration.config_feature_flags_migration import ConfigFeatureFlags from bot_data.migration.config_migration import ConfigMigration from bot_data.migration.db_history_migration import DBHistoryMigration from bot_data.migration.default_role_migration import DefaultRoleMigration +from bot_data.migration.fix_updates_migration import FixUpdatesMigration from bot_data.migration.initial_migration import InitialMigration from bot_data.migration.level_migration import LevelMigration from bot_data.migration.remove_stats_migration import RemoveStatsMigration @@ -52,3 +53,4 @@ class StartupMigrationExtension(StartupExtensionABC): services.add_transient(MigrationABC, ConfigFeatureFlagsMigration) # 15.08.2023 #334 - 1.1.0 services.add_transient(MigrationABC, DefaultRoleMigration) # 24.09.2023 #360 - 1.1.3 services.add_transient(MigrationABC, ShortRoleNameMigration) # 28.09.2023 #378 - 1.1.7 + services.add_transient(MigrationABC, FixUpdatesMigration) # 28.09.2023 #378 - 1.1.7 diff --git a/kdb-bot/src/bot_data/abc/migration_abc.py b/kdb-bot/src/bot_data/abc/migration_abc.py index d09c52ac..8d6ebb0f 100644 --- a/kdb-bot/src/bot_data/abc/migration_abc.py +++ b/kdb-bot/src/bot_data/abc/migration_abc.py @@ -24,8 +24,6 @@ class MigrationABC(ABC): def downgrade(self): pass - - def _exec(self, file: str): path = f"{os.path.dirname(os.path.realpath(__file__))}/db_history_scripts" sql = open(f"{path}/{file}").read() diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/config/server.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/config/server.sql index e9c327b8..0cbc399a 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/config/server.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/config/server.sql @@ -1,23 +1,25 @@ CREATE TABLE IF NOT EXISTS `CFG_ServerHistory` ( - `Id` BIGINT(20) NOT NULL, - `MessageDeleteTimer` BIGINT NOT NULL DEFAULT 6, - `NotificationChatId` BIGINT NOT NULL, - `MaxVoiceStateHours` BIGINT NOT NULL DEFAULT 6, - `XpPerMessage` BIGINT NOT NULL DEFAULT 1, - `XpPerReaction` BIGINT NOT NULL DEFAULT 1, - `MaxMessageXpPerHour` BIGINT NOT NULL DEFAULT 20, - `XpPerOntimeHour` BIGINT NOT NULL DEFAULT 10, - `XpPerEventParticipation` BIGINT NOT NULL DEFAULT 10, - `XpPerAchievement` BIGINT NOT NULL DEFAULT 10, - `AFKCommandChannelId` BIGINT NOT NULL, - `HelpVoiceChannelId` BIGINT NOT NULL, - `TeamChannelId` BIGINT NOT NULL, - `LoginMessageChannelId` BIGINT NOT NULL, - `ServerId` BIGINT NOT NULL, - `Deleted` BOOL DEFAULT FALSE, - `DateFrom` DATETIME(6) NOT NULL, - `DateTo` DATETIME(6) NOT NULL + `Id` BIGINT(20) NOT NULL, + `MessageDeleteTimer` BIGINT NOT NULL DEFAULT 6, + `NotificationChatId` BIGINT NOT NULL, + `MaxVoiceStateHours` BIGINT NOT NULL DEFAULT 6, + `XpPerMessage` BIGINT NOT NULL DEFAULT 1, + `XpPerReaction` BIGINT NOT NULL DEFAULT 1, + `MaxMessageXpPerHour` BIGINT NOT NULL DEFAULT 20, + `XpPerOntimeHour` BIGINT NOT NULL DEFAULT 10, + `XpPerEventParticipation` BIGINT NOT NULL DEFAULT 10, + `XpPerAchievement` BIGINT NOT NULL DEFAULT 10, + `AFKCommandChannelId` BIGINT NOT NULL, + `HelpVoiceChannelId` BIGINT NOT NULL, + `TeamChannelId` BIGINT NOT NULL, + `LoginMessageChannelId` BIGINT NOT NULL, + `DefaultRoleId` BIGINT NULL, + `FeatureFlags` JSON NULL DEFAULT ('{}'), + `ServerId` BIGINT NOT NULL, + `Deleted` BOOL DEFAULT FALSE, + `DateFrom` DATETIME(6) NOT NULL, + `DateTo` DATETIME(6) NOT NULL ); DROP TRIGGER IF EXISTS `TR_CFG_ServerUpdate`; @@ -27,44 +29,44 @@ CREATE TRIGGER `TR_CFG_ServerUpdate` ON `CFG_Server` FOR EACH ROW BEGIN - INSERT INTO `CFG_ServerHistory` ( - `Id`, - `MessageDeleteTimer`, - `NotificationChatId`, - `MaxVoiceStateHours`, - `XpPerMessage`, - `XpPerReaction`, - `MaxMessageXpPerHour`, - `XpPerOntimeHour`, - `XpPerEventParticipation`, - `XpPerAchievement`, - `AFKCommandChannelId`, - `HelpVoiceChannelId`, - `TeamChannelId`, - `LoginMessageChannelId`, - `ServerId`, - `DateFrom`, - `DateTo` - ) - VALUES ( - OLD.Id, - OLD.MessageDeleteTimer, - OLD.NotificationChatId, - OLD.MaxVoiceStateHours, - OLD.XpPerMessage, - OLD.XpPerReaction, - OLD.MaxMessageXpPerHour, - OLD.XpPerOntimeHour, - OLD.XpPerEventParticipation, - OLD.XpPerAchievement, - OLD.AFKCommandChannelId, - OLD.HelpVoiceChannelId, - OLD.TeamChannelId, - OLD.LoginMessageChannelId, - OLD.ServerId, - OLD.LastModifiedAt, - CURRENT_TIMESTAMP(6) - ); + INSERT INTO `CFG_ServerHistory` (`Id`, + `MessageDeleteTimer`, + `NotificationChatId`, + `MaxVoiceStateHours`, + `XpPerMessage`, + `XpPerReaction`, + `MaxMessageXpPerHour`, + `XpPerOntimeHour`, + `XpPerEventParticipation`, + `XpPerAchievement`, + `AFKCommandChannelId`, + `HelpVoiceChannelId`, + `TeamChannelId`, + `LoginMessageChannelId`, + `DefaultRoleId`, + `FeatureFlags`, + `ServerId`, + `DateFrom`, + `DateTo`) + VALUES (OLD.Id, + OLD.MessageDeleteTimer, + OLD.NotificationChatId, + OLD.MaxVoiceStateHours, + OLD.XpPerMessage, + OLD.XpPerReaction, + OLD.MaxMessageXpPerHour, + OLD.XpPerOntimeHour, + OLD.XpPerEventParticipation, + OLD.XpPerAchievement, + OLD.AFKCommandChannelId, + OLD.HelpVoiceChannelId, + OLD.TeamChannelId, + OLD.LoginMessageChannelId, + OLD.DefaultRoleId, + OLD.FeatureFlags, + OLD.ServerId, + OLD.LastModifiedAt, + CURRENT_TIMESTAMP(6)); END; DROP TRIGGER IF EXISTS `TR_CFG_ServerDelete`; @@ -74,44 +76,44 @@ CREATE TRIGGER `TR_CFG_ServerDelete` ON `CFG_Server` FOR EACH ROW BEGIN - INSERT INTO `CFG_ServerHistory` ( - `Id`, - `MessageDeleteTimer`, - `NotificationChatId`, - `MaxVoiceStateHours`, - `XpPerMessage`, - `XpPerReaction`, - `MaxMessageXpPerHour`, - `XpPerOntimeHour`, - `XpPerEventParticipation`, - `XpPerAchievement`, - `AFKCommandChannelId`, - `HelpVoiceChannelId`, - `TeamChannelId`, - `LoginMessageChannelId`, - `ServerId`, - `Deleted`, - `DateFrom`, - `DateTo` - ) - VALUES ( - OLD.Id, - OLD.MessageDeleteTimer, - OLD.NotificationChatId, - OLD.MaxVoiceStateHours, - OLD.XpPerMessage, - OLD.XpPerReaction, - OLD.MaxMessageXpPerHour, - OLD.XpPerOntimeHour, - OLD.XpPerEventParticipation, - OLD.XpPerAchievement, - OLD.AFKCommandChannelId, - OLD.HelpVoiceChannelId, - OLD.TeamChannelId, - OLD.LoginMessageChannelId, - OLD.ServerId, - TRUE, - OLD.LastModifiedAt, - CURRENT_TIMESTAMP(6) - ); + INSERT INTO `CFG_ServerHistory` (`Id`, + `MessageDeleteTimer`, + `NotificationChatId`, + `MaxVoiceStateHours`, + `XpPerMessage`, + `XpPerReaction`, + `MaxMessageXpPerHour`, + `XpPerOntimeHour`, + `XpPerEventParticipation`, + `XpPerAchievement`, + `AFKCommandChannelId`, + `HelpVoiceChannelId`, + `TeamChannelId`, + `LoginMessageChannelId`, + `DefaultRoleId`, + `ServerId`, + `FeatureFlags`, + `Deleted`, + `DateFrom`, + `DateTo`) + VALUES (OLD.Id, + OLD.MessageDeleteTimer, + OLD.NotificationChatId, + OLD.MaxVoiceStateHours, + OLD.XpPerMessage, + OLD.XpPerReaction, + OLD.MaxMessageXpPerHour, + OLD.XpPerOntimeHour, + OLD.XpPerEventParticipation, + OLD.XpPerAchievement, + OLD.AFKCommandChannelId, + OLD.HelpVoiceChannelId, + OLD.TeamChannelId, + OLD.LoginMessageChannelId, + OLD.DefaultRoleId, + OLD.FeatureFlags, + OLD.ServerId, + TRUE, + OLD.LastModifiedAt, + CURRENT_TIMESTAMP(6)); END; \ No newline at end of file diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/config/technician.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/config/technician.sql index 50907c2f..2256cbc8 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/config/technician.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/config/technician.sql @@ -1,13 +1,14 @@ CREATE TABLE IF NOT EXISTS `CFG_TechnicianHistory` ( - `Id` BIGINT(20) NOT NULL, + `Id` BIGINT(20) NOT NULL, `HelpCommandReferenceUrl` VARCHAR(255) NOT NULL, - `WaitForRestart` BIGINT NOT NULL DEFAULT 8, - `WaitForShutdown` BIGINT NOT NULL DEFAULT 8, - `CacheMaxMessages` BIGINT NOT NULL DEFAULT 1000000, - `Deleted` BOOL DEFAULT FALSE, - `DateFrom` DATETIME(6) NOT NULL, - `DateTo` DATETIME(6) NOT NULL + `WaitForRestart` BIGINT NOT NULL DEFAULT 8, + `WaitForShutdown` BIGINT NOT NULL DEFAULT 8, + `CacheMaxMessages` BIGINT NOT NULL DEFAULT 1000000, + `FeatureFlags` JSON NULL DEFAULT ('{}'), + `Deleted` BOOL DEFAULT FALSE, + `DateFrom` DATETIME(6) NOT NULL, + `DateTo` DATETIME(6) NOT NULL ); DROP TRIGGER IF EXISTS `TR_CFG_TechnicianUpdate`; @@ -17,24 +18,22 @@ CREATE TRIGGER `TR_CFG_TechnicianUpdate` ON `CFG_Technician` FOR EACH ROW BEGIN - INSERT INTO `CFG_TechnicianHistory` ( - `Id`, - `HelpCommandReferenceUrl`, - `WaitForRestart`, - `WaitForShutdown`, - `CacheMaxMessages`, - `DateFrom`, - `DateTo` - ) - VALUES ( - OLD.Id, - OLD.HelpCommandReferenceUrl, - OLD.WaitForRestart, - OLD.WaitForShutdown, - OLD.CacheMaxMessages, - OLD.LastModifiedAt, - CURRENT_TIMESTAMP(6) - ); + INSERT INTO `CFG_TechnicianHistory` (`Id`, + `HelpCommandReferenceUrl`, + `WaitForRestart`, + `WaitForShutdown`, + `CacheMaxMessages`, + `FeatureFlags`, + `DateFrom`, + `DateTo`) + VALUES (OLD.Id, + OLD.HelpCommandReferenceUrl, + OLD.WaitForRestart, + OLD.WaitForShutdown, + OLD.CacheMaxMessages, + OLD.FeatureFlags, + OLD.LastModifiedAt, + CURRENT_TIMESTAMP(6)); END; DROP TRIGGER IF EXISTS `TR_CFG_TechnicianDelete`; @@ -44,24 +43,22 @@ CREATE TRIGGER `TR_CFG_TechnicianDelete` ON `CFG_Technician` FOR EACH ROW BEGIN - INSERT INTO `CFG_TechnicianHistory` ( - `Id`, - `HelpCommandReferenceUrl`, - `WaitForRestart`, - `WaitForShutdown`, - `CacheMaxMessages`, - `Deleted`, - `DateFrom`, - `DateTo` - ) - VALUES ( - OLD.Id, - OLD.HelpCommandReferenceUrl, - OLD.WaitForRestart, - OLD.WaitForShutdown, - OLD.CacheMaxMessages, - TRUE, - OLD.LastModifiedAt, - CURRENT_TIMESTAMP(6) - ); + INSERT INTO `CFG_TechnicianHistory` (`Id`, + `HelpCommandReferenceUrl`, + `WaitForRestart`, + `WaitForShutdown`, + `CacheMaxMessages`, + `FeatureFlags`, + `Deleted`, + `DateFrom`, + `DateTo`) + VALUES (OLD.Id, + OLD.HelpCommandReferenceUrl, + OLD.WaitForRestart, + OLD.WaitForShutdown, + OLD.CacheMaxMessages, + OLD.FeatureFlags, + TRUE, + OLD.LastModifiedAt, + CURRENT_TIMESTAMP(6)); END; \ No newline at end of file diff --git a/kdb-bot/src/bot_data/migration/fix_updates_migration.py b/kdb-bot/src/bot_data/migration/fix_updates_migration.py new file mode 100644 index 00000000..7ccc96d0 --- /dev/null +++ b/kdb-bot/src/bot_data/migration/fix_updates_migration.py @@ -0,0 +1,22 @@ +from bot_core.logging.database_logger import DatabaseLogger +from bot_data.abc.migration_abc import MigrationABC +from bot_data.db_context import DBContext + + +class FixUpdatesMigration(MigrationABC): + name = "1.1.7_FixUpdatesMigration" + + def __init__(self, logger: DatabaseLogger, db: DBContext): + MigrationABC.__init__(self) + self._logger = logger + self._db = db + self._cursor = db.cursor + + def upgrade(self): + self._logger.debug(__name__, "Running upgrade") + + self._exec("config/server.sql") + self._exec("config/technician.sql") + + def downgrade(self): + pass diff --git a/kdb-bot/src/bot_data/migration/short_role_name_migration.py b/kdb-bot/src/bot_data/migration/short_role_name_migration.py index 4a427b25..de63ea97 100644 --- a/kdb-bot/src/bot_data/migration/short_role_name_migration.py +++ b/kdb-bot/src/bot_data/migration/short_role_name_migration.py @@ -32,7 +32,7 @@ class ShortRoleNameMigration(MigrationABC): ) ) - self._exec("config/short_rule_names.sql") + self._exec("short_rule_names.sql") def downgrade(self): self._cursor.execute("DROP TABLE `ShortRoleNames`;") -- 2.45.2 From a303108da2ae180060e32ea00976fb5583f736bf Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 09:23:15 +0200 Subject: [PATCH 08/24] Fixed migration #378 --- kdb-bot/src/bot_data/abc/migration_abc.py | 4 +- .../bot_data/migration/config_migration.py | 12 +- .../migration/db_history_migration.py | 43 +++---- .../db_history_scripts/short_rule_names.sql | 11 +- .../migration/fix_updates_migration.py | 4 +- .../migration/short_role_name_migration.py | 3 +- kdb-bot/src/bot_data/model/short_role_name.py | 118 ++++++++++++++++++ .../bot_data/model/short_role_name_history.py | 56 +++++++++ 8 files changed, 209 insertions(+), 42 deletions(-) create mode 100644 kdb-bot/src/bot_data/model/short_role_name.py create mode 100644 kdb-bot/src/bot_data/model/short_role_name_history.py diff --git a/kdb-bot/src/bot_data/abc/migration_abc.py b/kdb-bot/src/bot_data/abc/migration_abc.py index 8d6ebb0f..67ed5e96 100644 --- a/kdb-bot/src/bot_data/abc/migration_abc.py +++ b/kdb-bot/src/bot_data/abc/migration_abc.py @@ -24,8 +24,8 @@ class MigrationABC(ABC): def downgrade(self): pass - def _exec(self, file: str): - path = f"{os.path.dirname(os.path.realpath(__file__))}/db_history_scripts" + def _exec(self, self_file: str, file: str): + path = f"{os.path.dirname(os.path.realpath(self_file))}/db_history_scripts" sql = open(f"{path}/{file}").read() for statement in sql.split("\n\n"): diff --git a/kdb-bot/src/bot_data/migration/config_migration.py b/kdb-bot/src/bot_data/migration/config_migration.py index 7ff33855..d65ac06d 100644 --- a/kdb-bot/src/bot_data/migration/config_migration.py +++ b/kdb-bot/src/bot_data/migration/config_migration.py @@ -16,12 +16,12 @@ class ConfigMigration(MigrationABC): self._server_upgrade() self._technician_upgrade() - self._exec("config/server.sql") - self._exec("config/server_afk_channels.sql") - self._exec("config/server_team_roles.sql") - self._exec("config/technician.sql") - self._exec("config/technician_ids.sql") - self._exec("config/technician_ping_urls.sql") + self._exec(__file__, "config/server.sql") + self._exec(__file__, "config/server_afk_channels.sql") + self._exec(__file__, "config/server_team_roles.sql") + self._exec(__file__, "config/technician.sql") + self._exec(__file__, "config/technician_ids.sql") + self._exec(__file__, "config/technician_ping_urls.sql") def _server_upgrade(self): self._cursor.execute( diff --git a/kdb-bot/src/bot_data/migration/db_history_migration.py b/kdb-bot/src/bot_data/migration/db_history_migration.py index e7322ad9..5452d9e5 100644 --- a/kdb-bot/src/bot_data/migration/db_history_migration.py +++ b/kdb-bot/src/bot_data/migration/db_history_migration.py @@ -1,5 +1,3 @@ -import os - from bot_core.logging.database_logger import DatabaseLogger from bot_data.abc.migration_abc import MigrationABC from bot_data.db_context import DBContext @@ -15,33 +13,26 @@ class DBHistoryMigration(MigrationABC): self._db = db self._cursor = db.cursor - def _exec(self, file: str): - path = f"{os.path.dirname(os.path.realpath(__file__))}/db_history_scripts" - sql = open(f"{path}/{file}").read() - - for statement in sql.split("\n\n"): - self._cursor.execute(statement + ";") - def upgrade(self): self._logger.debug(__name__, "Running upgrade") - self._exec("api_keys.sql") - self._exec("auth_users.sql") - self._exec("auth_user_users_relation.sql") - self._exec("auto_role_rules.sql") - self._exec("auto_roles.sql") - self._exec("clients.sql") - self._exec("game_servers.sql") - self._exec("known_users.sql") - self._exec("levels.sql") - self._exec("servers.sql") - self._exec("user_game_idents.sql") - self._exec("user_joined_game_servers.sql") - self._exec("user_joined_servers.sql") - self._exec("user_joined_voice_channel.sql") - self._exec("user_message_count_per_hour.sql") - self._exec("users.sql") - self._exec("user_warnings.sql") + self._exec(__file__, "api_keys.sql") + self._exec(__file__, "auth_users.sql") + self._exec(__file__, "auth_user_users_relation.sql") + self._exec(__file__, "auto_role_rules.sql") + self._exec(__file__, "auto_roles.sql") + self._exec(__file__, "clients.sql") + self._exec(__file__, "game_servers.sql") + self._exec(__file__, "known_users.sql") + self._exec(__file__, "levels.sql") + self._exec(__file__, "servers.sql") + self._exec(__file__, "user_game_idents.sql") + self._exec(__file__, "user_joined_game_servers.sql") + self._exec(__file__, "user_joined_servers.sql") + self._exec(__file__, "user_joined_voice_channel.sql") + self._exec(__file__, "user_message_count_per_hour.sql") + self._exec(__file__, "users.sql") + self._exec(__file__, "user_warnings.sql") self._logger.debug(__name__, "Finished history upgrade") diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql index 5f5b7f72..fb64f239 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql @@ -1,8 +1,9 @@ CREATE TABLE IF NOT EXISTS `ShortRoleNamesHistory` ( `Id` BIGINT(20) NOT NULL, - `Name` VARCHAR(64) DEFAULT NULL, + `ShortName` VARCHAR(64) DEFAULT NULL, `DiscordRoleId` BIGINT(20) NOT NULL, + `ServerId` BIGINT(20) DEFAULT NULL, `Deleted` BOOL DEFAULT FALSE, `DateFrom` DATETIME(6) NOT NULL, `DateTo` DATETIME(6) NOT NULL @@ -15,8 +16,8 @@ CREATE TRIGGER `TR_ShortRoleNamesUpdate` ON `ShortRoleNames` FOR EACH ROW BEGIN - INSERT INTO `ShortRoleNamesHistory` (`Id`, `Name`, `DiscordRoleId`, `DateFrom`, `DateTo`) - VALUES (OLD.Id, OLD.Name, OLD.DiscordRoleId, OLD.LastModifiedAt, CURRENT_TIMESTAMP(6)); + INSERT INTO `ShortRoleNamesHistory` (`Id`, `ShortName`, `DiscordRoleId`, `ServerId`, `DateFrom`, `DateTo`) + VALUES (OLD.Id, OLD.ShortName, OLD.DiscordRoleId, OLD.ServerId, OLD.LastModifiedAt, CURRENT_TIMESTAMP(6)); END; DROP TRIGGER IF EXISTS `TR_ShortRoleNamesDelete`; @@ -26,8 +27,8 @@ CREATE TRIGGER `TR_ShortRoleNamesDelete` ON `ShortRoleNames` FOR EACH ROW BEGIN - INSERT INTO `ShortRoleNamesHistory` (`Id`, `Name`, `DiscordRoleId`, `Deleted`, `DateFrom`, + INSERT INTO `ShortRoleNamesHistory` (`Id`, `ShortName`, `DiscordRoleId`, `ServerId`, `Deleted`, `DateFrom`, `DateTo`) - VALUES (OLD.Id, OLD.Name, OLD.DiscordRoleId, TRUE, OLD.LastModifiedAt, + VALUES (OLD.Id, OLD.ShortName, OLD.DiscordRoleId, OLD.ServerId, TRUE, OLD.LastModifiedAt, CURRENT_TIMESTAMP(6)); END; \ No newline at end of file diff --git a/kdb-bot/src/bot_data/migration/fix_updates_migration.py b/kdb-bot/src/bot_data/migration/fix_updates_migration.py index 7ccc96d0..80f846a1 100644 --- a/kdb-bot/src/bot_data/migration/fix_updates_migration.py +++ b/kdb-bot/src/bot_data/migration/fix_updates_migration.py @@ -15,8 +15,8 @@ class FixUpdatesMigration(MigrationABC): def upgrade(self): self._logger.debug(__name__, "Running upgrade") - self._exec("config/server.sql") - self._exec("config/technician.sql") + self._exec(__file__, "config/server.sql") + self._exec(__file__, "config/technician.sql") def downgrade(self): pass diff --git a/kdb-bot/src/bot_data/migration/short_role_name_migration.py b/kdb-bot/src/bot_data/migration/short_role_name_migration.py index de63ea97..7d7d88ca 100644 --- a/kdb-bot/src/bot_data/migration/short_role_name_migration.py +++ b/kdb-bot/src/bot_data/migration/short_role_name_migration.py @@ -32,7 +32,8 @@ class ShortRoleNameMigration(MigrationABC): ) ) - self._exec("short_rule_names.sql") + self._exec(__file__, "short_rule_names.sql") def downgrade(self): self._cursor.execute("DROP TABLE `ShortRoleNames`;") + self._cursor.execute("DROP TABLE `ShortRoleNamesHistory`;") diff --git a/kdb-bot/src/bot_data/model/short_role_name.py b/kdb-bot/src/bot_data/model/short_role_name.py new file mode 100644 index 00000000..52f68e75 --- /dev/null +++ b/kdb-bot/src/bot_data/model/short_role_name.py @@ -0,0 +1,118 @@ +from datetime import datetime + +from cpl_core.database import TableABC +from cpl_core.dependency_injection import ServiceProviderABC +from cpl_discord.service import DiscordBotServiceABC + +from bot_data.model.server import Server + + +class ShortRoleName(TableABC): + def __init__( + self, + name: str, + discord_role_id: int, + server: Server, + created_at: datetime = None, + modified_at: datetime = None, + id=0, + ): + self._id = id + self._name = name + self._discord_role_id = discord_role_id + self._server = server + + TableABC.__init__(self) + self._created_at = created_at if created_at is not None else self._created_at + self._modified_at = modified_at if modified_at is not None else self._modified_at + + @property + def id(self) -> int: + return self._id + + @property + def name(self) -> str: + return self._name + + @name.setter + def name(self, value: str): + self._name = value + + @property + def role_id(self) -> int: + return self._discord_role_id + + @role_id.setter + def role_id(self, value: int): + self._discord_role_id = value + + @property + @ServiceProviderABC.inject + def role_name(self, bot: DiscordBotServiceABC) -> str: + guild = bot.get_guild(self._server.discord_id) + return guild.get_role(self.role_id).name + + @property + def server(self) -> Server: + return self._server + + @staticmethod + def get_select_all_string() -> str: + return str( + f""" + SELECT * FROM `ShortRoleNames`; + """ + ) + + @staticmethod + def get_select_by_id_string(id: int) -> str: + return str( + f""" + SELECT * FROM `ShortRoleNames` + WHERE `Id` = {id}; + """ + ) + + @staticmethod + def get_select_by_server_id_string(id: int) -> str: + return str( + f""" + SELECT * FROM `ShortRoleNames` + WHERE `ServerId` = {id}; + """ + ) + + @property + def insert_string(self) -> str: + return str( + f""" + INSERT INTO `ShortRoleNames` ( + `Name`, `DiscordRoleId`, `ServerId` + ) VALUES ( + '{self._name}', + {self._discord_role_id} + {self._server.id}, + ); + """ + ) + + @property + def udpate_string(self) -> str: + return str( + f""" + UPDATE `ShortRoleNames` + SET `Name` = '{self._name}', + `DiscordRoleId` = {self._discord_role_id}, + `ServerId` = {self._server.id} + WHERE `Id` = {self._id}; + """ + ) + + @property + def delete_string(self) -> str: + return str( + f""" + DELETE FROM `ShortRoleNames` + WHERE `Id` = {self._id}; + """ + ) diff --git a/kdb-bot/src/bot_data/model/short_role_name_history.py b/kdb-bot/src/bot_data/model/short_role_name_history.py new file mode 100644 index 00000000..57d7e1b1 --- /dev/null +++ b/kdb-bot/src/bot_data/model/short_role_name_history.py @@ -0,0 +1,56 @@ +from cpl_core.dependency_injection import ServiceProviderABC +from cpl_discord.service import DiscordBotServiceABC + +from bot_data.abc.history_table_abc import HistoryTableABC + + +class AutoRoleRuleHistory(HistoryTableABC): + def __init__( + self, + name: str, + discord_role_id: int, + server: int, + deleted: bool, + date_from: str, + date_to: str, + id=0, + ): + HistoryTableABC.__init__(self) + self._id = id + self._name = name + self._discord_role_id = discord_role_id + self._server = server + + self._deleted = deleted + self._date_from = date_from + self._date_to = date_to + + @property + def id(self) -> int: + return self._id + + @property + def name(self) -> str: + return self._name + + @name.setter + def name(self, value: str): + self._name = value + + @property + def role_id(self) -> int: + return self._discord_role_id + + @role_id.setter + def role_id(self, value: int): + self._discord_role_id = value + + @property + @ServiceProviderABC.inject + def role_name(self, bot: DiscordBotServiceABC) -> str: + guild = bot.get_guild(self._server.discord_id) + return guild.get_role(self.role_id).name + + @property + def server(self) -> int: + return self._server -- 2.45.2 From 0b767fcb6863323ee28f222b5df49efb6d58637b Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 09:32:09 +0200 Subject: [PATCH 09/24] Improved data model #378 --- .../db_history_scripts/short_rule_names.sql | 17 ++++++++++------- .../migration/short_role_name_migration.py | 1 + kdb-bot/src/bot_data/model/short_role_name.py | 11 +++++++++++ .../model/short_role_name_position_enum.py | 6 ++++++ 4 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 kdb-bot/src/bot_data/model/short_role_name_position_enum.py diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql index fb64f239..06168a34 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql @@ -1,12 +1,13 @@ CREATE TABLE IF NOT EXISTS `ShortRoleNamesHistory` ( - `Id` BIGINT(20) NOT NULL, + `Id` BIGINT(20) NOT NULL, `ShortName` VARCHAR(64) DEFAULT NULL, - `DiscordRoleId` BIGINT(20) NOT NULL, + `DiscordRoleId` BIGINT(20) NOT NULL, + `Position` ENUM ('Before', 'After') NOT NULL, `ServerId` BIGINT(20) DEFAULT NULL, `Deleted` BOOL DEFAULT FALSE, - `DateFrom` DATETIME(6) NOT NULL, - `DateTo` DATETIME(6) NOT NULL + `DateFrom` DATETIME(6) NOT NULL, + `DateTo` DATETIME(6) NOT NULL ); DROP TRIGGER IF EXISTS `TR_ShortRoleNamesUpdate`; @@ -16,8 +17,10 @@ CREATE TRIGGER `TR_ShortRoleNamesUpdate` ON `ShortRoleNames` FOR EACH ROW BEGIN - INSERT INTO `ShortRoleNamesHistory` (`Id`, `ShortName`, `DiscordRoleId`, `ServerId`, `DateFrom`, `DateTo`) - VALUES (OLD.Id, OLD.ShortName, OLD.DiscordRoleId, OLD.ServerId, OLD.LastModifiedAt, CURRENT_TIMESTAMP(6)); + INSERT INTO `ShortRoleNamesHistory` (`Id`, `ShortName`, `DiscordRoleId`, `Position`, `ServerId`, `DateFrom`, + `DateTo`) + VALUES (OLD.Id, OLD.ShortName, OLD.DiscordRoleId, OLD.Position, OLD.ServerId, OLD.LastModifiedAt, + CURRENT_TIMESTAMP(6)); END; DROP TRIGGER IF EXISTS `TR_ShortRoleNamesDelete`; @@ -29,6 +32,6 @@ CREATE TRIGGER `TR_ShortRoleNamesDelete` BEGIN INSERT INTO `ShortRoleNamesHistory` (`Id`, `ShortName`, `DiscordRoleId`, `ServerId`, `Deleted`, `DateFrom`, `DateTo`) - VALUES (OLD.Id, OLD.ShortName, OLD.DiscordRoleId, OLD.ServerId, TRUE, OLD.LastModifiedAt, + VALUES (OLD.Id, OLD.ShortName, OLD.DiscordRoleId, OLD.Position, OLD.ServerId, TRUE, OLD.LastModifiedAt, CURRENT_TIMESTAMP(6)); END; \ No newline at end of file diff --git a/kdb-bot/src/bot_data/migration/short_role_name_migration.py b/kdb-bot/src/bot_data/migration/short_role_name_migration.py index 7d7d88ca..0d4ae6ff 100644 --- a/kdb-bot/src/bot_data/migration/short_role_name_migration.py +++ b/kdb-bot/src/bot_data/migration/short_role_name_migration.py @@ -22,6 +22,7 @@ class ShortRoleNameMigration(MigrationABC): `Id` BIGINT NOT NULL AUTO_INCREMENT, `ShortName` VARCHAR(255) NOT NULL, `DiscordRoleId` BIGINT NOT NULL, + `Position` ENUM('Before', 'After') NOT NULL, `ServerId` BIGINT, `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6), `LastModifiedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), diff --git a/kdb-bot/src/bot_data/model/short_role_name.py b/kdb-bot/src/bot_data/model/short_role_name.py index 52f68e75..fab3c711 100644 --- a/kdb-bot/src/bot_data/model/short_role_name.py +++ b/kdb-bot/src/bot_data/model/short_role_name.py @@ -5,6 +5,7 @@ from cpl_core.dependency_injection import ServiceProviderABC from cpl_discord.service import DiscordBotServiceABC from bot_data.model.server import Server +from bot_data.model.short_role_name_position_enum import ShortRoleNamePositionEnum class ShortRoleName(TableABC): @@ -12,6 +13,7 @@ class ShortRoleName(TableABC): self, name: str, discord_role_id: int, + position: ShortRoleNamePositionEnum, server: Server, created_at: datetime = None, modified_at: datetime = None, @@ -20,6 +22,7 @@ class ShortRoleName(TableABC): self._id = id self._name = name self._discord_role_id = discord_role_id + self._position = position self._server = server TableABC.__init__(self) @@ -52,6 +55,14 @@ class ShortRoleName(TableABC): guild = bot.get_guild(self._server.discord_id) return guild.get_role(self.role_id).name + @property + def position(self) -> ShortRoleNamePositionEnum: + return self._position + + @position.setter + def position(self, value: ShortRoleNamePositionEnum): + self._position = value + @property def server(self) -> Server: return self._server diff --git a/kdb-bot/src/bot_data/model/short_role_name_position_enum.py b/kdb-bot/src/bot_data/model/short_role_name_position_enum.py new file mode 100644 index 00000000..1dfca2f8 --- /dev/null +++ b/kdb-bot/src/bot_data/model/short_role_name_position_enum.py @@ -0,0 +1,6 @@ +from enum import Enum + + +class ShortRoleNamePositionEnum(Enum): + before = "Before" + after = "After" -- 2.45.2 From 12f956f4c3adf1aba5beb1f47b1b22034719ee09 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 09:39:44 +0200 Subject: [PATCH 10/24] Added repo #378 --- .../abc/short_role_name_repository_abc.py | 40 ++++++++ kdb-bot/src/bot_data/data_module.py | 3 + kdb-bot/src/bot_data/model/short_role_name.py | 13 ++- .../short_role_name_repository_service.py | 93 +++++++++++++++++++ 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 kdb-bot/src/bot_data/abc/short_role_name_repository_abc.py create mode 100644 kdb-bot/src/bot_data/service/short_role_name_repository_service.py diff --git a/kdb-bot/src/bot_data/abc/short_role_name_repository_abc.py b/kdb-bot/src/bot_data/abc/short_role_name_repository_abc.py new file mode 100644 index 00000000..9ebcaf8f --- /dev/null +++ b/kdb-bot/src/bot_data/abc/short_role_name_repository_abc.py @@ -0,0 +1,40 @@ +from abc import ABC, abstractmethod +from typing import Optional + +from cpl_query.extension import List + +from bot_data.model.short_role_name import ShortRoleName + + +class ShortRoleNameRepositoryABC(ABC): + @abstractmethod + def __init__(self): + pass + + @abstractmethod + def get_short_role_names(self) -> List[ShortRoleName]: + pass + + @abstractmethod + def get_short_role_name_by_id(self, id: int) -> ShortRoleName: + pass + + @abstractmethod + def find_short_role_name_by_role_id(self, role_id: int) -> Optional[ShortRoleName]: + pass + + @abstractmethod + def get_short_role_names_by_server_id(self, id: int) -> List[ShortRoleName]: + pass + + @abstractmethod + def add_short_role_name(self, short_role_name: ShortRoleName): + pass + + @abstractmethod + def update_short_role_name(self, short_role_name: ShortRoleName): + pass + + @abstractmethod + def delete_short_role_name(self, short_role_name: ShortRoleName): + pass diff --git a/kdb-bot/src/bot_data/data_module.py b/kdb-bot/src/bot_data/data_module.py index 9c35713e..427c9cc6 100644 --- a/kdb-bot/src/bot_data/data_module.py +++ b/kdb-bot/src/bot_data/data_module.py @@ -16,6 +16,7 @@ from bot_data.abc.known_user_repository_abc import KnownUserRepositoryABC from bot_data.abc.level_repository_abc import LevelRepositoryABC from bot_data.abc.server_config_repository_abc import ServerConfigRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC +from bot_data.abc.short_role_name_repository_abc import ShortRoleNameRepositoryABC from bot_data.abc.technician_config_repository_abc import TechnicianConfigRepositoryABC from bot_data.abc.user_game_ident_repository_abc import UserGameIdentRepositoryABC from bot_data.abc.user_joined_game_server_repository_abc import UserJoinedGameServerRepositoryABC @@ -41,6 +42,7 @@ from bot_data.service.seeder_service import SeederService from bot_data.service.server_config_repository_service import ServerConfigRepositoryService from bot_data.service.server_config_seeder import ServerConfigSeeder from bot_data.service.server_repository_service import ServerRepositoryService +from bot_data.service.short_role_name_repository_service import ShortRoleNameRepositoryService from bot_data.service.technician_config_repository_service import TechnicianConfigRepositoryService from bot_data.service.technician_config_seeder import TechnicianConfigSeeder from bot_data.service.user_game_ident_repository_service import UserGameIdentRepositoryService @@ -89,6 +91,7 @@ class DataModule(ModuleABC): services.add_transient(AchievementRepositoryABC, AchievementRepositoryService) services.add_transient(TechnicianConfigRepositoryABC, TechnicianConfigRepositoryService) services.add_transient(ServerConfigRepositoryABC, ServerConfigRepositoryService) + services.add_transient(ShortRoleNameRepositoryABC, ShortRoleNameRepositoryService) services.add_transient(SeederService) services.add_transient(DataSeederABC, TechnicianConfigSeeder) diff --git a/kdb-bot/src/bot_data/model/short_role_name.py b/kdb-bot/src/bot_data/model/short_role_name.py index fab3c711..24996063 100644 --- a/kdb-bot/src/bot_data/model/short_role_name.py +++ b/kdb-bot/src/bot_data/model/short_role_name.py @@ -84,6 +84,15 @@ class ShortRoleName(TableABC): """ ) + @staticmethod + def get_select_by_role_id_string(id: int) -> str: + return str( + f""" + SELECT * FROM `ShortRoleNames` + WHERE `DiscordRoleId` = {id}; + """ + ) + @staticmethod def get_select_by_server_id_string(id: int) -> str: return str( @@ -98,10 +107,11 @@ class ShortRoleName(TableABC): return str( f""" INSERT INTO `ShortRoleNames` ( - `Name`, `DiscordRoleId`, `ServerId` + `Name`, `DiscordRoleId`, `Position`, `ServerId` ) VALUES ( '{self._name}', {self._discord_role_id} + '{self._position}', {self._server.id}, ); """ @@ -114,6 +124,7 @@ class ShortRoleName(TableABC): UPDATE `ShortRoleNames` SET `Name` = '{self._name}', `DiscordRoleId` = {self._discord_role_id}, + `Position` = '{self._position}', `ServerId` = {self._server.id} WHERE `Id` = {self._id}; """ diff --git a/kdb-bot/src/bot_data/service/short_role_name_repository_service.py b/kdb-bot/src/bot_data/service/short_role_name_repository_service.py new file mode 100644 index 00000000..855abea3 --- /dev/null +++ b/kdb-bot/src/bot_data/service/short_role_name_repository_service.py @@ -0,0 +1,93 @@ +from typing import Optional + +from cpl_core.database.context import DatabaseContextABC +from cpl_query.extension import List + +from bot_core.logging.database_logger import DatabaseLogger +from bot_data.abc.server_repository_abc import ServerRepositoryABC +from bot_data.abc.short_role_name_repository_abc import ShortRoleNameRepositoryABC +from bot_data.model.short_role_name import ShortRoleName +from bot_data.model.short_role_name_position_enum import ShortRoleNamePositionEnum + + +class ShortRoleNameRepositoryService(ShortRoleNameRepositoryABC): + def __init__( + self, + logger: DatabaseLogger, + db_context: DatabaseContextABC, + servers: ServerRepositoryABC, + ): + self._logger = logger + self._context = db_context + + self._servers = servers + + ShortRoleNameRepositoryABC.__init__(self) + + @staticmethod + def _get_value_from_result(value: any) -> Optional[any]: + if isinstance(value, str) and "NULL" in value: + return None + + return value + + def _short_role_name_from_result(self, sql_result: tuple) -> ShortRoleName: + return ShortRoleName( + self._get_value_from_result(sql_result[1]), # name + int(self._get_value_from_result(sql_result[2])), # role_id + ShortRoleNamePositionEnum(self._get_value_from_result(sql_result[3])), # position + self._servers.get_server_by_id(sql_result[4]), # server + self._get_value_from_result(sql_result[5]), # created_at + self._get_value_from_result(sql_result[6]), # modified_at + id=self._get_value_from_result(sql_result[0]), # id + ) + + def get_short_role_names(self) -> List[ShortRoleName]: + short_role_names = List(ShortRoleName) + self._logger.trace(__name__, f"Send SQL command: {ShortRoleName.get_select_all_string()}") + results = self._context.select(ShortRoleName.get_select_all_string()) + for result in results: + self._logger.trace(__name__, f"Get short_role_name with id {result[0]}") + short_role_names.append(self._short_role_name_from_result(result)) + + return short_role_names + + def get_short_role_name_by_id(self, id: int) -> ShortRoleName: + self._logger.trace(__name__, f"Send SQL command: {ShortRoleName.get_select_by_id_string(id)}") + result = self._context.select(ShortRoleName.get_select_by_id_string(id))[0] + + return self._short_role_name_from_result(result) + + def find_short_role_name_by_role_id(self, role_id: int) -> Optional[ShortRoleName]: + self._logger.trace(__name__, f"Send SQL command: {ShortRoleName.get_select_by_role_id_string(role_id)}") + result = self._context.select(ShortRoleName.get_select_by_role_id_string(role_id)) + if result is None or len(result) == 0: + return None + + return self._short_role_name_from_result(result[0]) + + def get_short_role_names_by_server_id(self, server_id: int) -> List[ShortRoleName]: + short_role_names = List(ShortRoleName) + self._logger.trace( + __name__, + f"Send SQL command: {ShortRoleName.get_select_by_server_id_string(server_id)}", + ) + results = self._context.select(ShortRoleName.get_select_by_server_id_string(server_id)) + + for result in results: + self._logger.trace(__name__, f"Get short_role_name with id {result[0]}") + short_role_names.append(self._short_role_name_from_result(result)) + + return short_role_names + + def add_short_role_name(self, short_role_name: ShortRoleName): + self._logger.trace(__name__, f"Send SQL command: {short_role_name.insert_string}") + self._context.cursor.execute(short_role_name.insert_string) + + def update_short_role_name(self, short_role_name: ShortRoleName): + self._logger.trace(__name__, f"Send SQL command: {short_role_name.udpate_string}") + self._context.cursor.execute(short_role_name.udpate_string) + + def delete_short_role_name(self, short_role_name: ShortRoleName): + self._logger.trace(__name__, f"Send SQL command: {short_role_name.delete_string}") + self._context.cursor.execute(short_role_name.delete_string) -- 2.45.2 From 5bfd04722c3d060c26b189b903d409e0b34882c6 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 10:00:30 +0200 Subject: [PATCH 11/24] Added query #378 --- kdb-bot/src/bot_data/model/short_role_name.py | 18 ++--- .../bot_data/model/short_role_name_history.py | 2 +- .../filter/short_role_name_filter.py | 70 +++++++++++++++++++ kdb-bot/src/bot_graphql/graphql/query.gql | 3 + .../src/bot_graphql/graphql/shortRoleName.gql | 49 +++++++++++++ kdb-bot/src/bot_graphql/graphql_module.py | 6 ++ .../queries/short_role_name_history_query.py | 11 +++ .../queries/short_role_name_query.py | 18 +++++ kdb-bot/src/bot_graphql/query.py | 5 ++ 9 files changed, 172 insertions(+), 10 deletions(-) create mode 100644 kdb-bot/src/bot_graphql/filter/short_role_name_filter.py create mode 100644 kdb-bot/src/bot_graphql/graphql/shortRoleName.gql create mode 100644 kdb-bot/src/bot_graphql/queries/short_role_name_history_query.py create mode 100644 kdb-bot/src/bot_graphql/queries/short_role_name_query.py diff --git a/kdb-bot/src/bot_data/model/short_role_name.py b/kdb-bot/src/bot_data/model/short_role_name.py index 24996063..52b46444 100644 --- a/kdb-bot/src/bot_data/model/short_role_name.py +++ b/kdb-bot/src/bot_data/model/short_role_name.py @@ -11,7 +11,7 @@ from bot_data.model.short_role_name_position_enum import ShortRoleNamePositionEn class ShortRoleName(TableABC): def __init__( self, - name: str, + short_name: str, discord_role_id: int, position: ShortRoleNamePositionEnum, server: Server, @@ -20,7 +20,7 @@ class ShortRoleName(TableABC): id=0, ): self._id = id - self._name = name + self._short_name = short_name self._discord_role_id = discord_role_id self._position = position self._server = server @@ -34,12 +34,12 @@ class ShortRoleName(TableABC): return self._id @property - def name(self) -> str: - return self._name + def short_name(self) -> str: + return self._short_name - @name.setter - def name(self, value: str): - self._name = value + @short_name.setter + def short_name(self, value: str): + self._short_name = value @property def role_id(self) -> int: @@ -109,7 +109,7 @@ class ShortRoleName(TableABC): INSERT INTO `ShortRoleNames` ( `Name`, `DiscordRoleId`, `Position`, `ServerId` ) VALUES ( - '{self._name}', + '{self._short_name}', {self._discord_role_id} '{self._position}', {self._server.id}, @@ -122,7 +122,7 @@ class ShortRoleName(TableABC): return str( f""" UPDATE `ShortRoleNames` - SET `Name` = '{self._name}', + SET `Name` = '{self._short_name}', `DiscordRoleId` = {self._discord_role_id}, `Position` = '{self._position}', `ServerId` = {self._server.id} diff --git a/kdb-bot/src/bot_data/model/short_role_name_history.py b/kdb-bot/src/bot_data/model/short_role_name_history.py index 57d7e1b1..90bbdc00 100644 --- a/kdb-bot/src/bot_data/model/short_role_name_history.py +++ b/kdb-bot/src/bot_data/model/short_role_name_history.py @@ -4,7 +4,7 @@ from cpl_discord.service import DiscordBotServiceABC from bot_data.abc.history_table_abc import HistoryTableABC -class AutoRoleRuleHistory(HistoryTableABC): +class ShortRoleNameHistory(HistoryTableABC): def __init__( self, name: str, diff --git a/kdb-bot/src/bot_graphql/filter/short_role_name_filter.py b/kdb-bot/src/bot_graphql/filter/short_role_name_filter.py new file mode 100644 index 00000000..5f41d68e --- /dev/null +++ b/kdb-bot/src/bot_graphql/filter/short_role_name_filter.py @@ -0,0 +1,70 @@ +from cpl_discord.service import DiscordBotServiceABC +from cpl_query.extension import List + +from bot_data.model.short_role_name import ShortRoleName +from bot_data.model.short_role_name_position_enum import ShortRoleNamePositionEnum +from bot_data.model.user import User +from bot_graphql.abc.filter_abc import FilterABC + + +class ShortRoleNameFilter(FilterABC): + def __init__(self, bot: DiscordBotServiceABC): + FilterABC.__init__(self) + self._bot = bot + + self._id = None + self._short_name = None + self._role_id = None + self._role_name = None + self._position = None + self._server = None + + def from_dict(self, values: dict): + if "id" in values: + self._id = int(values["id"]) + + if "shortName" in values: + self._short_name = values["shortName"] + + if "roleId" in values: + self._role_id = int(values["roleId"]) + + if "roleName" in values: + self._role_name = values["roleName"] + + if "position" in values: + self._position = ShortRoleNamePositionEnum(values["position"]) + + if "server" in values: + from bot_graphql.filter.server_filter import ServerFilter + + self._server: ServerFilter = self._services.get_service(ServerFilter) + self._server.from_dict(values["server"]) + + def filter(self, query: List[User]) -> List[User]: + if self._id is not None: + query = query.where(lambda x: x.id == self._id) + + if self._short_name is not None: + query = query.where(lambda x: x.short_name == self._short_name or self._short_name in x.short_name) + + if self._role_id is not None: + query = query.where(lambda x: x.role_id == self._role_id) + + if self._role_name is not None and self._role_id is not None: + + def get_role_name(x: ShortRoleName): + guild = self._bot.get_guild(x.server.discord_id) + name = guild.get_role(x.role_id).name + return name == self._role_name or self._role_name in name + + query = query.where(get_role_name) + + if self._position is not None: + query = query.where(lambda x: x.position == self._position or self._position in x.position) + + if self._server is not None: + servers = self._server.filter(query.select(lambda x: x.server)).select(lambda x: x.id) + query = query.where(lambda x: x.server.id in servers) + + return query diff --git a/kdb-bot/src/bot_graphql/graphql/query.gql b/kdb-bot/src/bot_graphql/graphql/query.gql index af2d298e..96b63713 100644 --- a/kdb-bot/src/bot_graphql/graphql/query.gql +++ b/kdb-bot/src/bot_graphql/graphql/query.gql @@ -37,6 +37,9 @@ type Query { achievementAttributes: [AchievementAttribute] achievementOperators: [String] + shortRoleNameCount: Int + shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName] + technicianConfig: TechnicianConfig possibleFeatureFlags: [String] discord: Discord diff --git a/kdb-bot/src/bot_graphql/graphql/shortRoleName.gql b/kdb-bot/src/bot_graphql/graphql/shortRoleName.gql new file mode 100644 index 00000000..263d7536 --- /dev/null +++ b/kdb-bot/src/bot_graphql/graphql/shortRoleName.gql @@ -0,0 +1,49 @@ +type ShortRoleName implements TableWithHistoryQuery { + id: ID + shortName: String + roleId: String + roleName: String + position: String + + server: Server + + createdAt: String + modifiedAt: String + + history: [ShortRoleNameHistory] +} + +type ShortRoleNameHistory implements HistoryTableQuery { + id: ID + shortName: String + roleId: String + position: String + + server: ID + + deleted: Boolean + dateFrom: String + dateTo: String +} + +input ShortRoleNameFilter { + id: ID + shortName: String + roleId: String + roleName: String + position: String +} + +type ShortRoleNameMutation { + createShortRoleName(input: ShortRoleNameInput!): ShortRoleName + updateShortRoleName(input: ShortRoleNameInput!): ShortRoleName + deleteShortRoleName(id: ID): ShortRoleName +} + +input ShortRoleNameInput { + id: ID + shortName: String + roleId: String + roleName: String + position: String +} \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/graphql_module.py b/kdb-bot/src/bot_graphql/graphql_module.py index 1236a7b2..0c903f08 100644 --- a/kdb-bot/src/bot_graphql/graphql_module.py +++ b/kdb-bot/src/bot_graphql/graphql_module.py @@ -14,6 +14,7 @@ from bot_graphql.filter.auto_role_rule_filter import AutoRoleRuleFilter from bot_graphql.filter.client_filter import ClientFilter from bot_graphql.filter.level_filter import LevelFilter from bot_graphql.filter.server_filter import ServerFilter +from bot_graphql.filter.short_role_name_filter import ShortRoleNameFilter 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 @@ -51,6 +52,8 @@ from bot_graphql.queries.level_query import LevelQuery from bot_graphql.queries.server_config_query import ServerConfigQuery from bot_graphql.queries.server_history_query import ServerHistoryQuery from bot_graphql.queries.server_query import ServerQuery +from bot_graphql.queries.short_role_name_history_query import ShortRoleNameHistoryQuery +from bot_graphql.queries.short_role_name_query import ShortRoleNameQuery from bot_graphql.queries.technician_config_history_query import TechnicianConfigHistoryQuery from bot_graphql.queries.technician_config_query import TechnicianConfigQuery from bot_graphql.queries.technician_id_config_history_query import TechnicianIdConfigHistoryQuery @@ -110,6 +113,8 @@ class GraphQLModule(ModuleABC): services.add_transient(QueryABC, UserJoinedVoiceChannelQuery) services.add_transient(QueryABC, UserJoinedGameServerHistoryQuery) services.add_transient(QueryABC, UserJoinedGameServerQuery) + services.add_transient(QueryABC, ShortRoleNameHistoryQuery) + services.add_transient(QueryABC, ShortRoleNameQuery) services.add_transient(QueryABC, DiscordQuery) services.add_transient(QueryABC, GuildQuery) @@ -129,6 +134,7 @@ class GraphQLModule(ModuleABC): services.add_transient(FilterABC, UserJoinedServerFilter) services.add_transient(FilterABC, UserJoinedVoiceChannelFilter) services.add_transient(FilterABC, UserJoinedGameServerFilter) + services.add_transient(FilterABC, ShortRoleNameFilter) # mutations services.add_transient(QueryABC, AutoRoleMutation) diff --git a/kdb-bot/src/bot_graphql/queries/short_role_name_history_query.py b/kdb-bot/src/bot_graphql/queries/short_role_name_history_query.py new file mode 100644 index 00000000..87f57c6f --- /dev/null +++ b/kdb-bot/src/bot_graphql/queries/short_role_name_history_query.py @@ -0,0 +1,11 @@ +from bot_graphql.abc.history_query_abc import HistoryQueryABC + + +class ShortRoleNameHistoryQuery(HistoryQueryABC): + def __init__(self): + HistoryQueryABC.__init__(self, "ShortRoleName") + + self.set_field("id", lambda x, *_: x.id) + self.set_field("shortName", lambda x, *_: x.shortName) + self.set_field("roleId", lambda x, *_: x.roleId) + self.set_field("position", lambda x, *_: x.position) diff --git a/kdb-bot/src/bot_graphql/queries/short_role_name_query.py b/kdb-bot/src/bot_graphql/queries/short_role_name_query.py new file mode 100644 index 00000000..7fa75ab9 --- /dev/null +++ b/kdb-bot/src/bot_graphql/queries/short_role_name_query.py @@ -0,0 +1,18 @@ +from cpl_core.database.context import DatabaseContextABC + +from bot_data.model.short_role_name_history import ShortRoleNameHistory +from bot_graphql.abc.data_query_with_history_abc import DataQueryWithHistoryABC + + +class ShortRoleNameQuery(DataQueryWithHistoryABC): + def __init__( + self, + db: DatabaseContextABC, + ): + DataQueryWithHistoryABC.__init__(self, "ShortRoleName", "ShortRoleNamesHistory", ShortRoleNameHistory, db) + + self.set_field("id", lambda x, *_: x.id) + self.set_field("shortName", lambda x, *_: x.short_name) + self.set_field("roleId", lambda x, *_: x.role_id) + self.set_field("roleName", lambda x, *_: x.role_name) + self.set_field("position", lambda x, *_: x.position) diff --git a/kdb-bot/src/bot_graphql/query.py b/kdb-bot/src/bot_graphql/query.py index 69e5553e..2acb68a9 100644 --- a/kdb-bot/src/bot_graphql/query.py +++ b/kdb-bot/src/bot_graphql/query.py @@ -9,6 +9,7 @@ from bot_data.abc.game_server_repository_abc import GameServerRepositoryABC from bot_data.abc.known_user_repository_abc import KnownUserRepositoryABC from bot_data.abc.level_repository_abc import LevelRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC +from bot_data.abc.short_role_name_repository_abc import ShortRoleNameRepositoryABC from bot_data.abc.technician_config_repository_abc import TechnicianConfigRepositoryABC from bot_data.abc.user_joined_game_server_repository_abc import UserJoinedGameServerRepositoryABC from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepositoryABC @@ -21,6 +22,7 @@ from bot_graphql.filter.auto_role_rule_filter import AutoRoleRuleFilter from bot_graphql.filter.client_filter import ClientFilter from bot_graphql.filter.level_filter import LevelFilter from bot_graphql.filter.server_filter import ServerFilter +from bot_graphql.filter.short_role_name_filter import ShortRoleNameFilter 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 @@ -44,6 +46,7 @@ class Query(QueryABC): user_joined_game_server: UserJoinedGameServerRepositoryABC, users: UserRepositoryABC, achievements: AchievementRepositoryABC, + short_role_names: ShortRoleNameRepositoryABC, achievement_service: AchievementService, technician_config: TechnicianConfigRepositoryABC, ): @@ -71,6 +74,8 @@ class Query(QueryABC): ) self.add_collection("user", lambda *_: users.get_users(), UserFilter) self.add_collection("achievement", lambda *_: achievements.get_achievements(), AchievementFilter) + self.add_collection("shortRoleName", lambda *_: short_role_names.get_short_role_names(), ShortRoleNameFilter) + self.set_field("technicianConfig", lambda *_: technician_config.get_technician_config()) self.set_field("achievementAttributes", lambda *_: achievement_service.get_attributes()) -- 2.45.2 From 290b5f38a7358f6da63ab19ed1607950da2cf0a2 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 10:15:35 +0200 Subject: [PATCH 12/24] Added mutation #378 --- kdb-bot/src/bot_graphql/graphql/mutation.gql | 1 + kdb-bot/src/bot_graphql/graphql_module.py | 2 + kdb-bot/src/bot_graphql/mutation.py | 3 + .../mutations/short_role_name_mutation.py | 80 +++++++++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py diff --git a/kdb-bot/src/bot_graphql/graphql/mutation.gql b/kdb-bot/src/bot_graphql/graphql/mutation.gql index aa1d8cd6..9578fde0 100644 --- a/kdb-bot/src/bot_graphql/graphql/mutation.gql +++ b/kdb-bot/src/bot_graphql/graphql/mutation.gql @@ -5,6 +5,7 @@ type Mutation { user: UserMutation userJoinedGameServer: UserJoinedGameServerMutation achievement: AchievementMutation + shortRoleName: ShortRoleNameMutation technicianConfig: TechnicianConfigMutation serverConfig: ServerConfigMutation } \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/graphql_module.py b/kdb-bot/src/bot_graphql/graphql_module.py index 0c903f08..e4e99a16 100644 --- a/kdb-bot/src/bot_graphql/graphql_module.py +++ b/kdb-bot/src/bot_graphql/graphql_module.py @@ -26,6 +26,7 @@ from bot_graphql.mutations.auto_role_mutation import AutoRoleMutation from bot_graphql.mutations.auto_role_rule_mutation import AutoRoleRuleMutation from bot_graphql.mutations.level_mutation import LevelMutation from bot_graphql.mutations.server_config_mutation import ServerConfigMutation +from bot_graphql.mutations.short_role_name_mutation import ShortRoleNameMutation from bot_graphql.mutations.technician_config_mutation import TechnicianConfigMutation from bot_graphql.mutations.user_joined_game_server_mutation import UserJoinedGameServerMutation from bot_graphql.mutations.user_mutation import UserMutation @@ -142,6 +143,7 @@ class GraphQLModule(ModuleABC): services.add_transient(QueryABC, LevelMutation) services.add_transient(QueryABC, UserMutation) services.add_transient(QueryABC, AchievementMutation) + services.add_transient(QueryABC, ShortRoleNameMutation) services.add_transient(QueryABC, UserJoinedGameServerMutation) services.add_transient(QueryABC, TechnicianConfigMutation) services.add_transient(QueryABC, ServerConfigMutation) diff --git a/kdb-bot/src/bot_graphql/mutation.py b/kdb-bot/src/bot_graphql/mutation.py index 4631e321..3dc7d599 100644 --- a/kdb-bot/src/bot_graphql/mutation.py +++ b/kdb-bot/src/bot_graphql/mutation.py @@ -5,6 +5,7 @@ from bot_graphql.mutations.auto_role_mutation import AutoRoleMutation from bot_graphql.mutations.auto_role_rule_mutation import AutoRoleRuleMutation from bot_graphql.mutations.level_mutation import LevelMutation from bot_graphql.mutations.server_config_mutation import ServerConfigMutation +from bot_graphql.mutations.short_role_name_mutation import ShortRoleNameMutation from bot_graphql.mutations.technician_config_mutation import TechnicianConfigMutation from bot_graphql.mutations.user_joined_game_server_mutation import UserJoinedGameServerMutation from bot_graphql.mutations.user_mutation import UserMutation @@ -21,6 +22,7 @@ class Mutation(MutationType): user_joined_game_server: UserJoinedGameServerMutation, technician_config: TechnicianConfigMutation, server_config: ServerConfigMutation, + short_role_name_mutation: ShortRoleNameMutation, ): MutationType.__init__(self) @@ -30,5 +32,6 @@ class Mutation(MutationType): self.set_field("user", lambda *_: user_mutation) self.set_field("achievement", lambda *_: achievement_mutation) self.set_field("userJoinedGameServer", lambda *_: user_joined_game_server) + self.set_field("shortRoleName", lambda *_: short_role_name_mutation) self.set_field("technicianConfig", lambda *_: technician_config) self.set_field("serverConfig", lambda *_: server_config) diff --git a/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py b/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py new file mode 100644 index 00000000..c8368112 --- /dev/null +++ b/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py @@ -0,0 +1,80 @@ +from cpl_core.database.context import DatabaseContextABC +from cpl_discord.service import DiscordBotServiceABC + +from bot_data.abc.server_repository_abc import ServerRepositoryABC +from bot_data.abc.short_role_name_repository_abc import ShortRoleNameRepositoryABC +from bot_data.model.short_role_name import ShortRoleName +from bot_data.model.user_role_enum import UserRoleEnum +from bot_graphql.abc.query_abc import QueryABC +from modules.permission.service.permission_service import PermissionService + + +class ShortRoleNameMutation(QueryABC): + def __init__( + self, + servers: ServerRepositoryABC, + short_role_names: ShortRoleNameRepositoryABC, + bot: DiscordBotServiceABC, + db: DatabaseContextABC, + permissions: PermissionService, + ): + QueryABC.__init__(self, "ShortRoleNameMutation") + + self._servers = servers + self._short_role_names = short_role_names + self._bot = bot + self._db = db + self._permissions = permissions + + self.set_field("createShortRoleName", self.resolve_create_short_role_name) + self.set_field("updateShortRoleName", self.resolve_update_short_role_name) + self.set_field("deleteShortRoleName", self.resolve_delete_short_role_name) + + def resolve_create_short_role_name(self, *_, input: dict): + server = self._servers.get_server_by_id(input["serverId"]) + self._can_user_mutate_data(server, UserRoleEnum.admin) + + short_role_name = ShortRoleName( + input["shortName"], + input["roleId"], + input["position"], + server, + ) + self._short_role_names.add_short_role_name(short_role_name) + self._db.save_changes() + + def get_new_short_role_name(srn: ShortRoleName): + return ( + srn.short_name == short_role_name.short_name + and srn.role_id == short_role_name.role_id + and srn.position == short_role_name.position + ) + + return ( + self._short_role_names.get_short_role_names_by_server_id(short_role_name.server.id) + .where(get_new_short_role_name) + .last() + ) + + def resolve_update_short_role_name(self, *_, input: dict): + short_role_name = self._short_role_names.get_short_role_name_by_id(input["id"]) + self._can_user_mutate_data(short_role_name.server, UserRoleEnum.moderator) + + short_role_name.short_name = input["shortName"] if "shortName" in input else short_role_name.short_name + short_role_name.role_id = input["roleId"] if "roleId" in input else short_role_name.role_id + short_role_name.position = input["position"] if "position" in input else short_role_name.position + + self._short_role_names.update_short_role_name(short_role_name) + self._db.save_changes() + + short_role_name = self._short_role_names.get_short_role_name_by_id(input["id"]) + return short_role_name + + def resolve_delete_short_role_name(self, *_, id: int): + short_role_name = self._short_role_names.get_short_role_name_by_id(id) + self._can_user_mutate_data(short_role_name.server, UserRoleEnum.admin) + + self._short_role_names.delete_short_role_name(short_role_name) + self._db.save_changes() + + return short_role_name -- 2.45.2 From 97834240669cfed04d1cb7e9a5e1b6767e3033ee Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 10:38:08 +0200 Subject: [PATCH 13/24] Fixed mutation #378 --- .../migration/db_history_scripts/short_rule_names.sql | 3 ++- kdb-bot/src/bot_data/model/short_role_name.py | 8 ++++---- kdb-bot/src/bot_graphql/graphql/shortRoleName.gql | 1 + .../bot_graphql/mutations/short_role_name_mutation.py | 9 +++++++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql b/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql index 06168a34..f4ff95c2 100644 --- a/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql +++ b/kdb-bot/src/bot_data/migration/db_history_scripts/short_rule_names.sql @@ -30,7 +30,8 @@ CREATE TRIGGER `TR_ShortRoleNamesDelete` ON `ShortRoleNames` FOR EACH ROW BEGIN - INSERT INTO `ShortRoleNamesHistory` (`Id`, `ShortName`, `DiscordRoleId`, `ServerId`, `Deleted`, `DateFrom`, + INSERT INTO `ShortRoleNamesHistory` (`Id`, `ShortName`, `DiscordRoleId`, `Position`, `ServerId`, `Deleted`, + `DateFrom`, `DateTo`) VALUES (OLD.Id, OLD.ShortName, OLD.DiscordRoleId, OLD.Position, OLD.ServerId, TRUE, OLD.LastModifiedAt, CURRENT_TIMESTAMP(6)); diff --git a/kdb-bot/src/bot_data/model/short_role_name.py b/kdb-bot/src/bot_data/model/short_role_name.py index 52b46444..4ddef4f1 100644 --- a/kdb-bot/src/bot_data/model/short_role_name.py +++ b/kdb-bot/src/bot_data/model/short_role_name.py @@ -107,12 +107,12 @@ class ShortRoleName(TableABC): return str( f""" INSERT INTO `ShortRoleNames` ( - `Name`, `DiscordRoleId`, `Position`, `ServerId` + `ShortName`, `DiscordRoleId`, `Position`, `ServerId` ) VALUES ( '{self._short_name}', - {self._discord_role_id} + {self._discord_role_id}, '{self._position}', - {self._server.id}, + {self._server.id} ); """ ) @@ -122,7 +122,7 @@ class ShortRoleName(TableABC): return str( f""" UPDATE `ShortRoleNames` - SET `Name` = '{self._short_name}', + SET `ShortName` = '{self._short_name}', `DiscordRoleId` = {self._discord_role_id}, `Position` = '{self._position}', `ServerId` = {self._server.id} diff --git a/kdb-bot/src/bot_graphql/graphql/shortRoleName.gql b/kdb-bot/src/bot_graphql/graphql/shortRoleName.gql index 263d7536..69df2920 100644 --- a/kdb-bot/src/bot_graphql/graphql/shortRoleName.gql +++ b/kdb-bot/src/bot_graphql/graphql/shortRoleName.gql @@ -46,4 +46,5 @@ input ShortRoleNameInput { roleId: String roleName: String position: String + serverId: ID } \ No newline at end of file diff --git a/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py b/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py index c8368112..3f3ca3af 100644 --- a/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py +++ b/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py @@ -36,10 +36,15 @@ class ShortRoleNameMutation(QueryABC): short_role_name = ShortRoleName( input["shortName"], - input["roleId"], + int(input["roleId"]), input["position"], server, ) + + result = self._short_role_names.find_short_role_name_by_role_id(short_role_name.role_id) + if result is not None: + raise ValueError("Short name for role already exists") + self._short_role_names.add_short_role_name(short_role_name) self._db.save_changes() @@ -47,7 +52,7 @@ class ShortRoleNameMutation(QueryABC): return ( srn.short_name == short_role_name.short_name and srn.role_id == short_role_name.role_id - and srn.position == short_role_name.position + and srn.position.value == short_role_name.position ) return ( -- 2.45.2 From 4a763e4e033f43f7e9453bd5c1bb9122440a411b Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 10:44:09 +0200 Subject: [PATCH 14/24] Added position query #378 --- kdb-bot/src/bot_graphql/graphql/query.gql | 1 + kdb-bot/src/bot_graphql/query.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/kdb-bot/src/bot_graphql/graphql/query.gql b/kdb-bot/src/bot_graphql/graphql/query.gql index 96b63713..8946e9a9 100644 --- a/kdb-bot/src/bot_graphql/graphql/query.gql +++ b/kdb-bot/src/bot_graphql/graphql/query.gql @@ -39,6 +39,7 @@ type Query { shortRoleNameCount: Int shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName] + shortRoleNamePositions: [String] technicianConfig: TechnicianConfig possibleFeatureFlags: [String] diff --git a/kdb-bot/src/bot_graphql/query.py b/kdb-bot/src/bot_graphql/query.py index 2acb68a9..abde5cb0 100644 --- a/kdb-bot/src/bot_graphql/query.py +++ b/kdb-bot/src/bot_graphql/query.py @@ -15,6 +15,7 @@ from bot_data.abc.user_joined_game_server_repository_abc import UserJoinedGameSe from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepositoryABC from bot_data.abc.user_joined_voice_channel_repository_abc import UserJoinedVoiceChannelRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC +from bot_data.model.short_role_name_position_enum import ShortRoleNamePositionEnum from bot_graphql.abc.query_abc import QueryABC from bot_graphql.filter.achievement_filter import AchievementFilter from bot_graphql.filter.auto_role_filter import AutoRoleFilter @@ -80,5 +81,6 @@ class Query(QueryABC): self.set_field("achievementAttributes", lambda *_: achievement_service.get_attributes()) self.set_field("achievementOperators", lambda *_: achievement_service.get_operators()) + self.set_field("shortRoleNamePositions", lambda *_: [x.value for x in ShortRoleNamePositionEnum]) self.set_field("possibleFeatureFlags", lambda *_: [e.value for e in FeatureFlagsEnum]) self.set_field("discord", lambda *_: Discord(bot.guilds, List(any).extend(bot.users))) -- 2.45.2 From 4161d3a38a0546cc5564f794816bc9d2c8ecbd90 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 10:52:51 +0200 Subject: [PATCH 15/24] Added to server query #378 --- kdb-bot/src/bot_core/configuration/feature_flags_enum.py | 1 + .../src/bot_core/configuration/feature_flags_settings.py | 1 + kdb-bot/src/bot_graphql/graphql/server.gql | 3 +++ kdb-bot/src/bot_graphql/queries/server_query.py | 8 ++++++++ 4 files changed, 13 insertions(+) diff --git a/kdb-bot/src/bot_core/configuration/feature_flags_enum.py b/kdb-bot/src/bot_core/configuration/feature_flags_enum.py index d91d18f4..f9b7f160 100644 --- a/kdb-bot/src/bot_core/configuration/feature_flags_enum.py +++ b/kdb-bot/src/bot_core/configuration/feature_flags_enum.py @@ -16,6 +16,7 @@ class FeatureFlagsEnum(Enum): level_module = "LevelModule" moderator_module = "ModeratorModule" permission_module = "PermissionModule" + short_role_name = "ShortRoleName" # features api_only = "ApiOnly" presence = "Presence" diff --git a/kdb-bot/src/bot_core/configuration/feature_flags_settings.py b/kdb-bot/src/bot_core/configuration/feature_flags_settings.py index c90684a3..4d4373cf 100644 --- a/kdb-bot/src/bot_core/configuration/feature_flags_settings.py +++ b/kdb-bot/src/bot_core/configuration/feature_flags_settings.py @@ -18,6 +18,7 @@ class FeatureFlagsSettings(ConfigurationModelABC): FeatureFlagsEnum.moderator_module.value: False, # 02.10.2022 #48 FeatureFlagsEnum.permission_module.value: True, # 02.10.2022 #48 FeatureFlagsEnum.config_module.value: True, # 19.07.2023 #127 + FeatureFlagsEnum.short_role_name.value: False, # 28.09.2023 #378 # features FeatureFlagsEnum.api_only.value: False, # 13.10.2022 #70 FeatureFlagsEnum.presence.value: True, # 03.10.2022 #56 diff --git a/kdb-bot/src/bot_graphql/graphql/server.gql b/kdb-bot/src/bot_graphql/graphql/server.gql index be754bdb..67da7455 100644 --- a/kdb-bot/src/bot_graphql/graphql/server.gql +++ b/kdb-bot/src/bot_graphql/graphql/server.gql @@ -31,6 +31,9 @@ type Server implements TableWithHistoryQuery { achievementCount: Int achievements(filter: AchievementFilter, page: Page, sort: Sort): [Achievement] + shortRoleNameCount: Int + shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName] + config: ServerConfig createdAt: String diff --git a/kdb-bot/src/bot_graphql/queries/server_query.py b/kdb-bot/src/bot_graphql/queries/server_query.py index 08c686b5..1e5606bf 100644 --- a/kdb-bot/src/bot_graphql/queries/server_query.py +++ b/kdb-bot/src/bot_graphql/queries/server_query.py @@ -7,6 +7,7 @@ from bot_data.abc.client_repository_abc import ClientRepositoryABC from bot_data.abc.game_server_repository_abc import GameServerRepositoryABC from bot_data.abc.level_repository_abc import LevelRepositoryABC from bot_data.abc.server_config_repository_abc import ServerConfigRepositoryABC +from bot_data.abc.short_role_name_repository_abc import ShortRoleNameRepositoryABC from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepositoryABC from bot_data.abc.user_joined_voice_channel_repository_abc import UserJoinedVoiceChannelRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC @@ -17,6 +18,7 @@ from bot_graphql.filter.achievement_filter import AchievementFilter from bot_graphql.filter.auto_role_filter import AutoRoleFilter from bot_graphql.filter.client_filter import ClientFilter from bot_graphql.filter.level_filter import LevelFilter +from bot_graphql.filter.short_role_name_filter import ShortRoleNameFilter from bot_graphql.filter.user_filter import UserFilter @@ -33,6 +35,7 @@ class ServerQuery(DataQueryWithHistoryABC): ujs: UserJoinedServerRepositoryABC, ujvs: UserJoinedVoiceChannelRepositoryABC, achievements: AchievementRepositoryABC, + short_role_names: ShortRoleNameRepositoryABC, server_configs: ServerConfigRepositoryABC, ): DataQueryWithHistoryABC.__init__(self, "Server", "ServersHistory", ServerHistory, db) @@ -64,6 +67,11 @@ class ServerQuery(DataQueryWithHistoryABC): self.add_collection( "achievement", lambda server, *_: achievements.get_achievements_by_server_id(server.id), AchievementFilter ) + self.add_collection( + "shortRoleName", + lambda server, *_: short_role_names.get_short_role_names_by_server_id(server.id), + ShortRoleNameFilter, + ) self.set_field("config", lambda server, *_: server_configs.get_server_config_by_server(server.id)) @staticmethod -- 2.45.2 From 4c0a4bc1ae6fc1ea592356aae53a76a09a584f70 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 10:54:04 +0200 Subject: [PATCH 16/24] Added can see check #378 --- kdb-bot/src/bot_graphql/abc/query_abc.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kdb-bot/src/bot_graphql/abc/query_abc.py b/kdb-bot/src/bot_graphql/abc/query_abc.py index 67692585..7a397f42 100644 --- a/kdb-bot/src/bot_graphql/abc/query_abc.py +++ b/kdb-bot/src/bot_graphql/abc/query_abc.py @@ -20,6 +20,7 @@ from bot_data.model.known_user import KnownUser from bot_data.model.level import Level from bot_data.model.server import Server from bot_data.model.server_config import ServerConfig +from bot_data.model.short_role_name import ShortRoleName from bot_data.model.user import User from bot_data.model.user_joined_game_server import UserJoinedGameServer from bot_data.model.user_joined_server import UserJoinedServer @@ -184,6 +185,16 @@ class QueryABC(ObjectType): access = True break + elif type(element) == ShortRoleName: + element: ShortRoleName = element + for u in user.users: + u: User = u + guild = bot.get_guild(u.server.discord_id) + member = guild.get_member(u.discord_id) + if permissions.is_member_moderator(member) and u.server.id == element.server.id: + access = True + break + elif type(element) == dict and "key" in element and element["key"] in [e.value for e in FeatureFlagsEnum]: for u in user.users: u: User = u -- 2.45.2 From fe42d46a388915f03dac7b7f04dedea4d4f2de8b Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 11:30:58 +0200 Subject: [PATCH 17/24] Fixed server config #378 --- kdb-bot/src/bot_data/model/server_config.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kdb-bot/src/bot_data/model/server_config.py b/kdb-bot/src/bot_data/model/server_config.py index 86c23ddb..63738543 100644 --- a/kdb-bot/src/bot_data/model/server_config.py +++ b/kdb-bot/src/bot_data/model/server_config.py @@ -1,5 +1,6 @@ import json from datetime import datetime +from typing import Optional from cpl_core.configuration import ConfigurationModelABC from cpl_core.database import TableABC @@ -27,7 +28,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): help_voice_channel_id: int, team_channel_id: int, login_message_channel_id: int, - default_role_id: int, + default_role_id: Optional[int], feature_flags: dict[FeatureFlagsEnum], server: Server, afk_channel_ids: List[int], @@ -76,7 +77,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): guild.system_channel.id, guild.system_channel.id, guild.system_channel.id, - guild.default_role.id, + None, {}, server, List(int), @@ -288,7 +289,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): {self._help_voice_channel_id}, {self._team_channel_id}, {self._login_message_channel_id}, - {self._default_role_id}, + {"NULL" if self._default_role_id is None else self._default_role_id}, '{json.dumps(self._feature_flags)}', {self._server.id} ); @@ -313,7 +314,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): `HelpVoiceChannelId` = {self._help_voice_channel_id}, `TeamChannelId` = {self._team_channel_id}, `LoginMessageChannelId` = {self._login_message_channel_id}, - `DefaultRoleId` = {self._default_role_id}, + `DefaultRoleId` = {"NULL" if self._default_role_id is None else self._default_role_id}, `FeatureFlags` = '{json.dumps(self._feature_flags)}', `ServerId` = {self._server.id} WHERE `Id` = {self._id}; -- 2.45.2 From 94e003312d9e42b097a9797608fa39b8603e9821 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 11:35:38 +0200 Subject: [PATCH 18/24] Fixed migration #378 --- .../configuration/feature_flags_enum.py | 2 +- .../configuration/feature_flags_settings.py | 2 +- .../migration/fix_updates_migration.py | 31 ++++++++++++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/kdb-bot/src/bot_core/configuration/feature_flags_enum.py b/kdb-bot/src/bot_core/configuration/feature_flags_enum.py index f9b7f160..a370ef41 100644 --- a/kdb-bot/src/bot_core/configuration/feature_flags_enum.py +++ b/kdb-bot/src/bot_core/configuration/feature_flags_enum.py @@ -16,7 +16,7 @@ class FeatureFlagsEnum(Enum): level_module = "LevelModule" moderator_module = "ModeratorModule" permission_module = "PermissionModule" - short_role_name = "ShortRoleName" + short_role_name_module = "ShortRoleNameModule" # features api_only = "ApiOnly" presence = "Presence" diff --git a/kdb-bot/src/bot_core/configuration/feature_flags_settings.py b/kdb-bot/src/bot_core/configuration/feature_flags_settings.py index 4d4373cf..bf125e54 100644 --- a/kdb-bot/src/bot_core/configuration/feature_flags_settings.py +++ b/kdb-bot/src/bot_core/configuration/feature_flags_settings.py @@ -18,7 +18,7 @@ class FeatureFlagsSettings(ConfigurationModelABC): FeatureFlagsEnum.moderator_module.value: False, # 02.10.2022 #48 FeatureFlagsEnum.permission_module.value: True, # 02.10.2022 #48 FeatureFlagsEnum.config_module.value: True, # 19.07.2023 #127 - FeatureFlagsEnum.short_role_name.value: False, # 28.09.2023 #378 + FeatureFlagsEnum.short_role_name_module.value: False, # 28.09.2023 #378 # features FeatureFlagsEnum.api_only.value: False, # 13.10.2022 #70 FeatureFlagsEnum.presence.value: True, # 03.10.2022 #56 diff --git a/kdb-bot/src/bot_data/migration/fix_updates_migration.py b/kdb-bot/src/bot_data/migration/fix_updates_migration.py index 80f846a1..f4d5e020 100644 --- a/kdb-bot/src/bot_data/migration/fix_updates_migration.py +++ b/kdb-bot/src/bot_data/migration/fix_updates_migration.py @@ -15,8 +15,37 @@ class FixUpdatesMigration(MigrationABC): def upgrade(self): self._logger.debug(__name__, "Running upgrade") + self._cursor.execute( + str( + f""" + ALTER TABLE CFG_ServerHistory + ADD DefaultRoleId BIGINT NULL AFTER LoginMessageChannelId; + """ + ) + ) + + self._cursor.execute( + str( + """ALTER TABLE CFG_TechnicianHistory ADD FeatureFlags JSON NULL DEFAULT ('{}') AFTER CacheMaxMessages;""" + ) + ) + + self._cursor.execute( + str( + """ALTER TABLE CFG_ServerHistory ADD FeatureFlags JSON NULL DEFAULT ('{}') AFTER LoginMessageChannelId;""" + ) + ) + self._exec(__file__, "config/server.sql") self._exec(__file__, "config/technician.sql") def downgrade(self): - pass + self._cursor.execute( + str( + f""" + ALTER TABLE CFG_ServerHistory DROP COLUMN DefaultRoleId; + """ + ) + ) + self._cursor.execute("ALTER TABLE CFG_TechnicianHistory DROP COLUMN FeatureFlags;") + self._cursor.execute("ALTER TABLE CFG_ServerHistory DROP COLUMN FeatureFlags;") -- 2.45.2 From 8e8da46a5497eed0f0b6e7e4580e327f317bc268 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 13:17:42 +0200 Subject: [PATCH 19/24] Added short role names components #378 --- kdb-bot/src/bot_graphql/graphql/server.gql | 1 + .../src/bot_graphql/queries/server_query.py | 15 ++++++ kdb-web/src/app/models/data/server.model.ts | 3 ++ .../src/app/models/graphql/queries.model.ts | 8 +++ kdb-web/src/app/models/graphql/query.model.ts | 4 ++ .../history-btn/history-btn.component.ts | 5 +- .../dashboard/dashboard.component.ts | 8 ++- .../server-dashboard.component.html | 8 +-- .../server-dashboard.component.ts | 5 +- .../view/server/server-routing.module.ts | 5 +- .../app/modules/view/server/server.module.ts | 2 +- .../short-role-names.component.html | 1 + .../short-role-names.component.scss | 0 .../short-role-names.component.spec.ts | 23 ++++++++ .../short-role-names.component.ts | 39 ++++++++++++++ .../short-role-name-routing.module.ts | 14 +++++ .../short-role-name/short-role-name.module.ts | 17 ++++++ kdb-web/src/app/services/data/data.service.ts | 6 +-- .../src/app/services/server.service.spec.ts | 16 ++++++ kdb-web/src/app/services/server.service.ts | 36 +++++++++++++ .../app/services/sidebar/sidebar.service.ts | 54 +++++++++---------- kdb-web/src/assets/i18n/de.json | 1 + 22 files changed, 225 insertions(+), 46 deletions(-) create mode 100644 kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.html create mode 100644 kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.scss create mode 100644 kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.spec.ts create mode 100644 kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts create mode 100644 kdb-web/src/app/modules/view/server/short-role-name/short-role-name-routing.module.ts create mode 100644 kdb-web/src/app/modules/view/server/short-role-name/short-role-name.module.ts create mode 100644 kdb-web/src/app/services/server.service.spec.ts create mode 100644 kdb-web/src/app/services/server.service.ts diff --git a/kdb-bot/src/bot_graphql/graphql/server.gql b/kdb-bot/src/bot_graphql/graphql/server.gql index 67da7455..6b29f0f9 100644 --- a/kdb-bot/src/bot_graphql/graphql/server.gql +++ b/kdb-bot/src/bot_graphql/graphql/server.gql @@ -35,6 +35,7 @@ type Server implements TableWithHistoryQuery { shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName] config: ServerConfig + hasFeatureFlag(flag: String): Boolean createdAt: String modifiedAt: String diff --git a/kdb-bot/src/bot_graphql/queries/server_query.py b/kdb-bot/src/bot_graphql/queries/server_query.py index 1e5606bf..3690c37f 100644 --- a/kdb-bot/src/bot_graphql/queries/server_query.py +++ b/kdb-bot/src/bot_graphql/queries/server_query.py @@ -1,6 +1,9 @@ +from cpl_core.configuration import ConfigurationABC from cpl_core.database.context import DatabaseContextABC from cpl_discord.service import DiscordBotServiceABC +from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum +from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings from bot_data.abc.achievement_repository_abc import AchievementRepositoryABC from bot_data.abc.auto_role_repository_abc import AutoRoleRepositoryABC from bot_data.abc.client_repository_abc import ClientRepositoryABC @@ -12,6 +15,7 @@ from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepos from bot_data.abc.user_joined_voice_channel_repository_abc import UserJoinedVoiceChannelRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC from bot_data.model.server import Server +from bot_data.model.server_config import ServerConfig from bot_data.model.server_history import ServerHistory from bot_graphql.abc.data_query_with_history_abc import DataQueryWithHistoryABC from bot_graphql.filter.achievement_filter import AchievementFilter @@ -25,6 +29,7 @@ from bot_graphql.filter.user_filter import UserFilter class ServerQuery(DataQueryWithHistoryABC): def __init__( self, + config: ConfigurationABC, bot: DiscordBotServiceABC, db: DatabaseContextABC, auto_roles: AutoRoleRepositoryABC, @@ -40,6 +45,7 @@ class ServerQuery(DataQueryWithHistoryABC): ): DataQueryWithHistoryABC.__init__(self, "Server", "ServersHistory", ServerHistory, db) + self._config = config self._bot = bot self._auto_roles = auto_roles self._clients = clients @@ -73,6 +79,9 @@ class ServerQuery(DataQueryWithHistoryABC): ShortRoleNameFilter, ) self.set_field("config", lambda server, *_: server_configs.get_server_config_by_server(server.id)) + self.set_field( + "hasFeatureFlag", lambda server, *_, **kwargs: self._resolve_has_feature_flag(server, *_, **kwargs) + ) @staticmethod def resolve_id(server: Server, *_): @@ -89,3 +98,9 @@ class ServerQuery(DataQueryWithHistoryABC): @staticmethod def resolve_icon_url(server: Server, *_): return server.icon_url + + def _resolve_has_feature_flag(self, server: Server, *_, **kwargs): + settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{server.discord_id}") + if "flag" not in kwargs: + return False + return FeatureFlagsSettings.get_flag_from_dict(settings.feature_flags, FeatureFlagsEnum(kwargs["flag"])) diff --git a/kdb-web/src/app/models/data/server.model.ts b/kdb-web/src/app/models/data/server.model.ts index a045186d..fb2d2864 100644 --- a/kdb-web/src/app/models/data/server.model.ts +++ b/kdb-web/src/app/models/data/server.model.ts @@ -3,6 +3,7 @@ import {User} from "./user.model"; import {Level} from "./level.model"; import {Client} from "./client.model"; import { AutoRole } from "./auto_role.model"; +import { ServerConfig } from "../config/server-config.model"; export interface GameServer { id?: number; @@ -22,6 +23,8 @@ export interface Server extends Data { levels?: Level[]; userCount?: number; users?: User[]; + config?: ServerConfig; + hasFeatureFlag?: boolean; } export interface ServerFilter { diff --git a/kdb-web/src/app/models/graphql/queries.model.ts b/kdb-web/src/app/models/graphql/queries.model.ts index 1014ec79..ec5702a9 100644 --- a/kdb-web/src/app/models/graphql/queries.model.ts +++ b/kdb-web/src/app/models/graphql/queries.model.ts @@ -82,6 +82,14 @@ export class Queries { } `; + static hasServerFeatureFlag = ` + query HasServerFeatureFlag($filter: ServerFilter, $flag: String) { + servers(filter: $filter) { + hasFeatureFlag(flag: $flag) + } + } + `; + static gameServerQuery = ` query GameServersList($serverId: ID) { servers(filter: {id: $serverId}) { diff --git a/kdb-web/src/app/models/graphql/query.model.ts b/kdb-web/src/app/models/graphql/query.model.ts index fe0c9683..403436b3 100644 --- a/kdb-web/src/app/models/graphql/query.model.ts +++ b/kdb-web/src/app/models/graphql/query.model.ts @@ -64,3 +64,7 @@ export interface PossibleFeatureFlagsQuery { possibleFeatureFlags: string[]; } +export interface HasServerFeatureFlagQuery { + hasFeatureFlag: boolean; +} + diff --git a/kdb-web/src/app/modules/shared/components/history-btn/history-btn.component.ts b/kdb-web/src/app/modules/shared/components/history-btn/history-btn.component.ts index ca1a2d00..aeeebd39 100644 --- a/kdb-web/src/app/modules/shared/components/history-btn/history-btn.component.ts +++ b/kdb-web/src/app/modules/shared/components/history-btn/history-btn.component.ts @@ -11,6 +11,7 @@ import { FormBuilder } from "@angular/forms"; import { TranslateService } from "@ngx-translate/core"; import { ActivatedRoute } from "@angular/router"; import { SidebarService } from "../../../../services/sidebar/sidebar.service"; +import { ServerService } from "../../../../services/server.service"; @Component({ selector: "app-history-btn", @@ -37,12 +38,12 @@ export class HistoryBtnComponent implements OnInit { private translate: TranslateService, private data: DataService, private route: ActivatedRoute, - private sidebar: SidebarService + private serverService: ServerService ) { } public ngOnInit(): void { - this.server = this.sidebar.server$.value ?? {}; + this.server = this.serverService.server$.value ?? {}; } private findVal(object: any, key: string) { diff --git a/kdb-web/src/app/modules/view/dashboard/components/dashboard/dashboard.component.ts b/kdb-web/src/app/modules/view/dashboard/components/dashboard/dashboard.component.ts index f28ae00b..bf1e7a72 100644 --- a/kdb-web/src/app/modules/view/dashboard/components/dashboard/dashboard.component.ts +++ b/kdb-web/src/app/modules/view/dashboard/components/dashboard/dashboard.component.ts @@ -14,6 +14,7 @@ import { Page } from "../../../../../models/graphql/filter/page.model"; import { Sort } from "../../../../../models/graphql/filter/sort.model"; import { Query } from "../../../../../models/graphql/query.model"; import { SidebarService } from "../../../../../services/sidebar/sidebar.service"; +import { ServerService } from "../../../../../services/server.service"; @Component({ selector: "app-dashboard", @@ -44,12 +45,9 @@ export class DashboardComponent implements OnInit, OnDestroy { constructor( private data: DataService, private spinnerService: SpinnerService, - private toastService: ToastService, - private confirmDialog: ConfirmationDialogService, private fb: FormBuilder, - private translate: TranslateService, private router: Router, - private sidebar: SidebarService + private serverService: ServerService, ) { } @@ -107,7 +105,7 @@ export class DashboardComponent implements OnInit, OnDestroy { } selectServer(server: Server) { - this.sidebar.setServer(server); + this.serverService.setServer(server); this.router.navigate(["/server", server.id]); } diff --git a/kdb-web/src/app/modules/view/server/server-dashboard/server-dashboard.component.html b/kdb-web/src/app/modules/view/server/server-dashboard/server-dashboard.component.html index 69fa157d..f8263f8d 100644 --- a/kdb-web/src/app/modules/view/server/server-dashboard/server-dashboard.component.html +++ b/kdb-web/src/app/modules/view/server/server-dashboard/server-dashboard.component.html @@ -14,22 +14,22 @@

- {{server.name}} + {{server ? server.name : ''}}

- {{server.userCount}} + {{server ? server.userCount : ''}} {{'view.dashboard.server.member_count' | translate}}
+ *ngFor="let client of server?.clients">
diff --git a/kdb-web/src/app/modules/view/server/server-dashboard/server-dashboard.component.ts b/kdb-web/src/app/modules/view/server/server-dashboard/server-dashboard.component.ts index 642e0f7c..04edbb08 100644 --- a/kdb-web/src/app/modules/view/server/server-dashboard/server-dashboard.component.ts +++ b/kdb-web/src/app/modules/view/server/server-dashboard/server-dashboard.component.ts @@ -4,6 +4,7 @@ import { Server } from "src/app/models/data/server.model"; import { DataService } from "src/app/services/data/data.service"; import { SpinnerService } from "src/app/services/spinner/spinner.service"; import { SidebarService } from "../../../../services/sidebar/sidebar.service"; +import { ServerService } from "../../../../services/server.service"; @Component({ selector: "app-server-dashboard", @@ -20,7 +21,7 @@ export class ServerDashboardComponent implements OnInit { private router: Router, private data: DataService, private spinner: SpinnerService, - private sidebar: SidebarService + private serverService: ServerService ) { } @@ -29,7 +30,7 @@ export class ServerDashboardComponent implements OnInit { this.server = server; }); - this.sidebar.server$.subscribe(server => { + this.serverService.server$.subscribe(server => { if (!server) { return; } diff --git a/kdb-web/src/app/modules/view/server/server-routing.module.ts b/kdb-web/src/app/modules/view/server/server-routing.module.ts index b0e09575..505aa609 100644 --- a/kdb-web/src/app/modules/view/server/server-routing.module.ts +++ b/kdb-web/src/app/modules/view/server/server-routing.module.ts @@ -17,8 +17,9 @@ const routes: Routes = [ data: { memberRole: MemberRoles.Moderator } }, { path: "levels", loadChildren: () => import("./levels/levels.module").then(m => m.LevelsModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, - { path: "achievements", loadChildren: () => import("./achievements/achievements.module").then(m => m.AchievementsModule), data: { memberRole: MemberRoles.Moderator } }, - { path: "config", loadChildren: () => import("./config/config.module").then(m => m.ConfigModule), data: { memberRole: MemberRoles.Admin } } + { path: "achievements", loadChildren: () => import("./achievements/achievements.module").then(m => m.AchievementsModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, + { path: "short-role-names", loadChildren: () => import("./short-role-name/short-role-name.module").then(m => m.ShortRoleNameModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Moderator } }, + { path: "config", loadChildren: () => import("./config/config.module").then(m => m.ConfigModule), canActivate: [AuthGuard], data: { memberRole: MemberRoles.Admin } } ]; @NgModule({ diff --git a/kdb-web/src/app/modules/view/server/server.module.ts b/kdb-web/src/app/modules/view/server/server.module.ts index 1e4b2a8a..6a04b47f 100644 --- a/kdb-web/src/app/modules/view/server/server.module.ts +++ b/kdb-web/src/app/modules/view/server/server.module.ts @@ -14,7 +14,7 @@ import { ClientComponent } from './server-dashboard/components/client/client.com ServerDashboardComponent, ProfileComponent, MembersComponent, - ClientComponent + ClientComponent, ], imports: [ CommonModule, diff --git a/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.html b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.html new file mode 100644 index 00000000..5a75a1f6 --- /dev/null +++ b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.html @@ -0,0 +1 @@ +

short-role-names works!

diff --git a/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.scss b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.spec.ts b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.spec.ts new file mode 100644 index 00000000..2a09af96 --- /dev/null +++ b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ShortRoleNamesComponent } from './short-role-names.component'; + +describe('ShortRoleNamesComponent', () => { + let component: ShortRoleNamesComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ShortRoleNamesComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ShortRoleNamesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts new file mode 100644 index 00000000..b22c1ae9 --- /dev/null +++ b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from "@angular/core"; +import { AuthService } from "../../../../../../services/auth/auth.service"; +import { SpinnerService } from "../../../../../../services/spinner/spinner.service"; +import { ToastService } from "../../../../../../services/toast/toast.service"; +import { ConfirmationDialogService } from "../../../../../../services/confirmation-dialog/confirmation-dialog.service"; +import { FormBuilder } from "@angular/forms"; +import { TranslateService } from "@ngx-translate/core"; +import { DataService } from "../../../../../../services/data/data.service"; +import { SidebarService } from "../../../../../../services/sidebar/sidebar.service"; +import { ActivatedRoute } from "@angular/router"; +import { Server } from "../../../../../../models/data/server.model"; + +@Component({ + selector: 'app-short-role-names', + templateUrl: './short-role-names.component.html', + styleUrls: ['./short-role-names.component.scss'] +}) +export class ShortRoleNamesComponent implements OnInit { + private server: Server = {}; + + public constructor( + private authService: AuthService, + private spinner: SpinnerService, + private toastService: ToastService, + private confirmDialog: ConfirmationDialogService, + private fb: FormBuilder, + private translate: TranslateService, + private data: DataService, + private sidebar: SidebarService, + private route: ActivatedRoute + ) { + } + + public ngOnInit(): void { + this.data.getServerFromRoute(this.route).then(async server => { + this.server = server; + }); + } +} diff --git a/kdb-web/src/app/modules/view/server/short-role-name/short-role-name-routing.module.ts b/kdb-web/src/app/modules/view/server/short-role-name/short-role-name-routing.module.ts new file mode 100644 index 00000000..bd806f29 --- /dev/null +++ b/kdb-web/src/app/modules/view/server/short-role-name/short-role-name-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from "@angular/core"; +import { RouterModule, Routes } from "@angular/router"; +import { ShortRoleNamesComponent } from "./components/short-role-names/short-role-names.component"; + +const routes: Routes = [ + { path: "", component: ShortRoleNamesComponent }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ShortRoleNameRoutingModule { +} diff --git a/kdb-web/src/app/modules/view/server/short-role-name/short-role-name.module.ts b/kdb-web/src/app/modules/view/server/short-role-name/short-role-name.module.ts new file mode 100644 index 00000000..f35bd9ec --- /dev/null +++ b/kdb-web/src/app/modules/view/server/short-role-name/short-role-name.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ShortRoleNamesComponent } from './components/short-role-names/short-role-names.component'; +import { ShortRoleNameRoutingModule } from "./short-role-name-routing.module"; + + + +@NgModule({ + declarations: [ + ShortRoleNamesComponent, + ], + imports: [ + CommonModule, + ShortRoleNameRoutingModule + ] +}) +export class ShortRoleNameModule { } diff --git a/kdb-web/src/app/services/data/data.service.ts b/kdb-web/src/app/services/data/data.service.ts index 9d7d13b3..99d09b83 100644 --- a/kdb-web/src/app/services/data/data.service.ts +++ b/kdb-web/src/app/services/data/data.service.ts @@ -7,11 +7,11 @@ import { ActivatedRoute, Router } from "@angular/router"; import { Server } from "../../models/data/server.model"; import { Queries } from "../../models/graphql/queries.model"; import { Query } from "../../models/graphql/query.model"; -import { SidebarService } from "../sidebar/sidebar.service"; import { SpinnerService } from "../spinner/spinner.service"; import { GraphQLResult } from "../../models/graphql/result.model"; import { ToastService } from "../toast/toast.service"; import { TranslateService } from "@ngx-translate/core"; +import { ServerService } from "../server.service"; @Injectable({ providedIn: "root" @@ -21,7 +21,7 @@ export class DataService { constructor( private appsettings: SettingsService, private http: HttpClient, - private sidebar: SidebarService, + private server: ServerService, private spinner: SpinnerService, private router: Router, private toast: ToastService, @@ -45,7 +45,7 @@ export class DataService { return data.servers.length > 0 ? data.servers[0] : null; } ).subscribe(server => { - this.sidebar.setServer(server); + this.server.setServer(server); this.spinner.hideSpinner(); resolve(server); }); diff --git a/kdb-web/src/app/services/server.service.spec.ts b/kdb-web/src/app/services/server.service.spec.ts new file mode 100644 index 00000000..906c1601 --- /dev/null +++ b/kdb-web/src/app/services/server.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { ServerService } from './server.service'; + +describe('ServerService', () => { + let service: ServerService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(ServerService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/kdb-web/src/app/services/server.service.ts b/kdb-web/src/app/services/server.service.ts new file mode 100644 index 00000000..b01a608a --- /dev/null +++ b/kdb-web/src/app/services/server.service.ts @@ -0,0 +1,36 @@ +import { Injectable } from "@angular/core"; +import { BehaviorSubject } from "rxjs"; +import { Server } from "../models/data/server.model"; +import { NavigationEnd, Router } from "@angular/router"; + +@Injectable({ + providedIn: "root" +}) +export class ServerService { + + + server$ = new BehaviorSubject(null); + + constructor( + private router: Router + ) { + this.router.events.subscribe(event => { + if (!(event instanceof NavigationEnd)) { + return; + } + if (!event.url.startsWith("/server/") && this.server$.value) { + this.setServer(null); + } + }); + } + + setServer(server: Server | null) { + if (!server) { + this.server$.next(server); + return; + } + if (server.id != this.server$.value?.id) { + this.server$.next(server); + } + } +} diff --git a/kdb-web/src/app/services/sidebar/sidebar.service.ts b/kdb-web/src/app/services/sidebar/sidebar.service.ts index c4d1a102..a2e05f05 100644 --- a/kdb-web/src/app/services/sidebar/sidebar.service.ts +++ b/kdb-web/src/app/services/sidebar/sidebar.service.ts @@ -8,6 +8,7 @@ import { NavigationEnd, Router } from "@angular/router"; import { ThemeService } from "../theme/theme.service"; import { Server } from "../../models/data/server.model"; import { UserDTO } from "../../models/auth/auth-user.dto"; +import { ServerService } from "../server.service"; @Injectable({ providedIn: "root" @@ -16,7 +17,7 @@ export class SidebarService { isSidebarOpen: boolean = true; menuItems$ = new BehaviorSubject(new Array()); - server$ = new BehaviorSubject(null); + server!: Server | null; dashboard: MenuItem = {}; serverDashboard: MenuItem = {}; @@ -25,6 +26,7 @@ export class SidebarService { serverAutoRoles: MenuItem = {}; serverLevels: MenuItem = {}; serverAchievements: MenuItem = {}; + serverShortRoleNames: MenuItem = {}; serverConfig: MenuItem = {}; serverMenu: MenuItem = {}; adminConfig: MenuItem = {}; @@ -35,7 +37,8 @@ export class SidebarService { private themeService: ThemeService, private authService: AuthService, private translateService: TranslateService, - private router: Router + private router: Router, + private serverService: ServerService ) { this.themeService.isSidebarOpen$.subscribe(value => { this.isSidebarOpen = value; @@ -46,25 +49,14 @@ export class SidebarService { this.setMenu(true); }); - this.router.events.subscribe(event => { - if (!(event instanceof NavigationEnd)) { - return; - } - if (!event.url.startsWith("/server/") && this.server$.value) { - this.setServer(null); - } - }); - } - - setServer(server: Server | null) { - if (server?.id != this.server$.value?.id) { - this.server$.next(server); + this.serverService.server$.subscribe(server => { + this.server = server; if (server) { this.setMenu(true); } else { this.setMenu(false); } - } + }); } async buildMenu(user: UserDTO | null, hasPermission: boolean, isTechnician: boolean = false) { @@ -76,54 +68,61 @@ export class SidebarService { this.serverDashboard = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.dashboard") : "", icon: "pi pi-th-large", - routerLink: `server/${this.server$.value?.id}` + routerLink: `server/${this.server?.id}` }; this.serverProfile = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.profile") : "", icon: "pi pi-id-card", - routerLink: `server/${this.server$.value?.id}/members/${user?.id}` + routerLink: `server/${this.server?.id}/members/${user?.id}` }; this.serverMembers = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.members") : "", icon: "pi pi-users", visible: true, - routerLink: `server/${this.server$.value?.id}/members` + routerLink: `server/${this.server?.id}/members` }; this.serverAutoRoles = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.auto_roles") : "", icon: "pi pi-sitemap", visible: true, - routerLink: `server/${this.server$.value?.id}/auto-roles` + routerLink: `server/${this.server?.id}/auto-roles` }; this.serverLevels = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.levels") : "", icon: "pi pi-book", visible: true, - routerLink: `server/${this.server$.value?.id}/levels` + routerLink: `server/${this.server?.id}/levels` }; this.serverAchievements = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.achievements") : "", icon: "pi pi-angle-double-up", visible: true, - routerLink: `server/${this.server$.value?.id}/achievements` + routerLink: `server/${this.server?.id}/achievements` + }; + + this.serverShortRoleNames = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.short_role_names") : "", + icon: "pi pi-list", + visible: true, + routerLink: `server/${this.server?.id}/short-role-names` }; this.serverConfig = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.configuration") : "", icon: "pi pi-cog", visible: true, - routerLink: `server/${this.server$.value?.id}/config` + routerLink: `server/${this.server?.id}/config` }; this.serverMenu = { - label: this.isSidebarOpen ? this.server$.value?.name : "", + label: this.isSidebarOpen ? this.server?.name : "", icon: "pi pi-server", visible: false, expanded: true, - items: [this.serverDashboard, this.serverProfile, this.serverMembers, this.serverAutoRoles, this.serverLevels, this.serverAchievements, this.serverConfig] + items: [this.serverDashboard, this.serverProfile, this.serverMembers, this.serverAutoRoles, this.serverLevels, this.serverAchievements, this.serverShortRoleNames, this.serverConfig] }; this.adminConfig = { label: this.isSidebarOpen ? this.translateService.instant("sidebar.config") : "", @@ -149,19 +148,20 @@ export class SidebarService { setMenu(build: boolean = false) { this.authService.hasUserPermission(AuthRoles.Admin).then(async hasPermission => { let authUser = await this.authService.getLoggedInUser(); - let user: UserDTO | null = authUser?.users?.find(u => u.server == this.server$.value?.id) ?? null; + let user: UserDTO | null = authUser?.users?.find(u => u.server == this.server?.id) ?? null; let isTechnician = authUser?.users?.map(u => u.isTechnician).filter(u => u) ?? []; if (build || this.menuItems$.value.length == 0) { await this.buildMenu(user, hasPermission, isTechnician.length > 0); } - if (this.server$.value) { + if (this.server) { this.serverMenu.visible = true; this.serverMembers.visible = !!user?.isModerator; this.serverAutoRoles.visible = !!user?.isModerator; this.serverLevels.visible = !!user?.isModerator; this.serverAchievements.visible = !!user?.isModerator; + this.serverShortRoleNames.visible = !!user?.isAdmin; this.serverConfig.visible = !!user?.isAdmin || isTechnician.length > 0; } else { this.serverMenu.visible = false; diff --git a/kdb-web/src/assets/i18n/de.json b/kdb-web/src/assets/i18n/de.json index 0eb8d3b2..24570a8e 100644 --- a/kdb-web/src/assets/i18n/de.json +++ b/kdb-web/src/assets/i18n/de.json @@ -310,6 +310,7 @@ "dashboard": "Dashboard", "members": "Mitglieder", "server": { + "short_role_names": "Rollen Kürzel", "achievements": "Errungenschaften", "auto_roles": "Auto Rollen", "configuration": "Konfiguration", -- 2.45.2 From 376cb76036b68917bd0e45cf3ea447feff8c3c49 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 14:36:35 +0200 Subject: [PATCH 20/24] Added frontend impl #378 --- .../migration/short_role_name_migration.py | 2 +- .../model/short_role_name_position_enum.py | 4 +- .../filter/short_role_name_filter.py | 2 +- .../queries/short_role_name_history_query.py | 2 +- .../queries/short_role_name_query.py | 2 +- .../app/models/data/short_role_name.model.ts | 20 ++ .../src/app/models/graphql/mutations.model.ts | 42 +++ .../src/app/models/graphql/queries.model.ts | 51 ++++ kdb-web/src/app/models/graphql/query.model.ts | 10 + .../src/app/models/graphql/result.model.ts | 9 + .../short-role-names.component.html | 217 +++++++++++++- .../short-role-names.component.ts | 269 +++++++++++++++++- .../short-role-name/short-role-name.module.ts | 15 +- kdb-web/src/assets/i18n/de.json | 29 +- kdb-web/src/assets/i18n/en.json | 28 +- 15 files changed, 685 insertions(+), 17 deletions(-) create mode 100644 kdb-web/src/app/models/data/short_role_name.model.ts diff --git a/kdb-bot/src/bot_data/migration/short_role_name_migration.py b/kdb-bot/src/bot_data/migration/short_role_name_migration.py index 0d4ae6ff..7fe5ddfd 100644 --- a/kdb-bot/src/bot_data/migration/short_role_name_migration.py +++ b/kdb-bot/src/bot_data/migration/short_role_name_migration.py @@ -22,7 +22,7 @@ class ShortRoleNameMigration(MigrationABC): `Id` BIGINT NOT NULL AUTO_INCREMENT, `ShortName` VARCHAR(255) NOT NULL, `DiscordRoleId` BIGINT NOT NULL, - `Position` ENUM('Before', 'After') NOT NULL, + `Position` ENUM('before', 'after') NOT NULL, `ServerId` BIGINT, `CreatedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6), `LastModifiedAt` DATETIME(6) NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), diff --git a/kdb-bot/src/bot_data/model/short_role_name_position_enum.py b/kdb-bot/src/bot_data/model/short_role_name_position_enum.py index 1dfca2f8..9390ab41 100644 --- a/kdb-bot/src/bot_data/model/short_role_name_position_enum.py +++ b/kdb-bot/src/bot_data/model/short_role_name_position_enum.py @@ -2,5 +2,5 @@ from enum import Enum class ShortRoleNamePositionEnum(Enum): - before = "Before" - after = "After" + before = "before" + after = "after" diff --git a/kdb-bot/src/bot_graphql/filter/short_role_name_filter.py b/kdb-bot/src/bot_graphql/filter/short_role_name_filter.py index 5f41d68e..426e3630 100644 --- a/kdb-bot/src/bot_graphql/filter/short_role_name_filter.py +++ b/kdb-bot/src/bot_graphql/filter/short_role_name_filter.py @@ -61,7 +61,7 @@ class ShortRoleNameFilter(FilterABC): query = query.where(get_role_name) if self._position is not None: - query = query.where(lambda x: x.position == self._position or self._position in x.position) + query = query.where(lambda x: x.position.value == self._position.value) if self._server is not None: servers = self._server.filter(query.select(lambda x: x.server)).select(lambda x: x.id) diff --git a/kdb-bot/src/bot_graphql/queries/short_role_name_history_query.py b/kdb-bot/src/bot_graphql/queries/short_role_name_history_query.py index 87f57c6f..46cb4a8b 100644 --- a/kdb-bot/src/bot_graphql/queries/short_role_name_history_query.py +++ b/kdb-bot/src/bot_graphql/queries/short_role_name_history_query.py @@ -8,4 +8,4 @@ class ShortRoleNameHistoryQuery(HistoryQueryABC): self.set_field("id", lambda x, *_: x.id) self.set_field("shortName", lambda x, *_: x.shortName) self.set_field("roleId", lambda x, *_: x.roleId) - self.set_field("position", lambda x, *_: x.position) + self.set_field("position", lambda x, *_: x.position.value) diff --git a/kdb-bot/src/bot_graphql/queries/short_role_name_query.py b/kdb-bot/src/bot_graphql/queries/short_role_name_query.py index 7fa75ab9..75d07ac6 100644 --- a/kdb-bot/src/bot_graphql/queries/short_role_name_query.py +++ b/kdb-bot/src/bot_graphql/queries/short_role_name_query.py @@ -15,4 +15,4 @@ class ShortRoleNameQuery(DataQueryWithHistoryABC): self.set_field("shortName", lambda x, *_: x.short_name) self.set_field("roleId", lambda x, *_: x.role_id) self.set_field("roleName", lambda x, *_: x.role_name) - self.set_field("position", lambda x, *_: x.position) + self.set_field("position", lambda x, *_: x.position.value) diff --git a/kdb-web/src/app/models/data/short_role_name.model.ts b/kdb-web/src/app/models/data/short_role_name.model.ts new file mode 100644 index 00000000..21c54802 --- /dev/null +++ b/kdb-web/src/app/models/data/short_role_name.model.ts @@ -0,0 +1,20 @@ +import { Data } from "./data.model"; +import { Server, ServerFilter } from "./server.model"; + +export interface ShortRoleName extends Data { + id?: number; + shortName?: string; + roleId?: string; + roleName?: string; + position?: string; + server?: Server; +} + +export interface ShortRoleNameFilter { + id?: number; + shortName?: string; + roleId?: string; + roleName?: string; + position?: string; + server?: ServerFilter; +} diff --git a/kdb-web/src/app/models/graphql/mutations.model.ts b/kdb-web/src/app/models/graphql/mutations.model.ts index 6fc27fc0..e600d07d 100644 --- a/kdb-web/src/app/models/graphql/mutations.model.ts +++ b/kdb-web/src/app/models/graphql/mutations.model.ts @@ -166,6 +166,48 @@ export class Mutations { } `; + static createShortRoleName = ` + mutation createShortRoleName($shortName: String, $roleId: String, $position: String, $serverId: ID) { + shortRoleName { + createShortRoleName(input: { shortName: $shortName, roleId: $roleId, position: $position, serverId: $serverId}) { + id + shortName + roleId + roleName + position + server { + id + } + } + } + } + `; + + static updateShortRoleName = ` + mutation updateShortRoleName($id: ID, $shortName: String, $roleId: String, $position: String, $serverId: ID) { + shortRoleName { + updateShortRoleName(input: { id: $id, shortName: $shortName, roleId: $roleId, position: $position, serverId: $serverId }) { + id + shortName + roleId + roleName + position + } + } + } + `; + + static deleteShortRoleName = ` + mutation deleteShortRoleName($id: ID) { + shortRoleName { + deleteShortRoleName(id: $id) { + id + shortName + } + } + } + `; + static updateTechnicianConfig = ` mutation updateTechnicianConfig($id: ID, $helpCommandReferenceUrl: String, $waitForRestart: Int, $waitForShutdown: Int, $cacheMaxMessages: Int, $featureFlags: [FeatureFlagInput], $pingURLs: [String], $technicianIds: [String]) { technicianConfig { diff --git a/kdb-web/src/app/models/graphql/queries.model.ts b/kdb-web/src/app/models/graphql/queries.model.ts index ec5702a9..1f069b6b 100644 --- a/kdb-web/src/app/models/graphql/queries.model.ts +++ b/kdb-web/src/app/models/graphql/queries.model.ts @@ -200,6 +200,57 @@ export class Queries { } `; + + static shortRoleNamePositionsQuery = ` + query { + shortRoleNamePositions + } + ` + + static shortRoleNameQuery = ` + query ShortRoleNameList($serverId: ID, $filter: ShortRoleNameFilter, $page: Page, $sort: Sort) { + servers(filter: {id: $serverId}) { + shortRoleNameCount + shortRoleNames(filter: $filter, page: $page, sort: $sort) { + id + shortName + roleId + roleName + position + server { + id + name + } + createdAt + modifiedAt + } + } + } + `; + + static shortRoleNameWithHistoryQuery = ` + query ShortRoleNameListHistory($serverId: ID, $id: ID) { + servers(filter: {id: $serverId}) { + shortRoleNameCount + shortRoleNames(filter: {id: $id}) { + id + + history { + id + shortName + roleId + roleName + position + server + deleted + dateFrom + dateTo + } + } + } + } + `; + static usersQuery = ` query UsersList($serverId: ID, $filter: UserFilter, $page: Page, $sort: Sort) { servers(filter: {id: $serverId}) { diff --git a/kdb-web/src/app/models/graphql/query.model.ts b/kdb-web/src/app/models/graphql/query.model.ts index 403436b3..332a63f9 100644 --- a/kdb-web/src/app/models/graphql/query.model.ts +++ b/kdb-web/src/app/models/graphql/query.model.ts @@ -6,6 +6,7 @@ import { Level } from "../data/level.model"; import { Achievement, AchievementAttribute } from "../data/achievement.model"; import { TechnicianConfig } from "../config/technician-config.model"; import { ServerConfig } from "../config/server-config.model"; +import { ShortRoleName } from "../data/short_role_name.model"; export interface Query { serverCount: number; @@ -68,3 +69,12 @@ export interface HasServerFeatureFlagQuery { hasFeatureFlag: boolean; } +export interface ShortRoleNameListQuery { + shortRoleNameCount: number; + shortRoleNames: ShortRoleName[]; +} + +export interface ShortRoleNamePositionsQuery { + shortRoleNamePositions: string[]; +} + diff --git a/kdb-web/src/app/models/graphql/result.model.ts b/kdb-web/src/app/models/graphql/result.model.ts index 573f98ce..cff8fcf2 100644 --- a/kdb-web/src/app/models/graphql/result.model.ts +++ b/kdb-web/src/app/models/graphql/result.model.ts @@ -5,6 +5,7 @@ import { Server } from "../data/server.model"; import { Achievement } from "../data/achievement.model"; import { TechnicianConfig } from "../config/technician-config.model"; import { ServerConfig } from "../config/server-config.model"; +import { ShortRoleName } from "../data/short_role_name.model"; export interface GraphQLResult { data: { @@ -68,3 +69,11 @@ export interface AchievementMutationResult { deleteAchievement?: Achievement }; } + +export interface ShortRoleNameMutationResult { + shortRoleName: { + createShortRoleName?: ShortRoleName + updateShortRoleName?: ShortRoleName + deleteShortRoleName?: ShortRoleName + }; +} diff --git a/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.html b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.html index 5a75a1f6..0cbc7ead 100644 --- a/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.html +++ b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.html @@ -1 +1,216 @@ -

short-role-names works!

+

+ {{'view.server.short_role_names.header' | translate}} +

+
+
+ + + +
+
+
+ {{shortRoleNames.length}} {{'common.of' | translate}} + {{dt.totalRecords}} + + {{'view.server.short_role_names.short_role_names' | translate}} +
+ + +
+ +
+ + +
+
+
+ + + + +
+
{{'common.id' | translate}}
+ +
+ + + +
+
{{'common.name' | translate}}
+ +
+ + + +
+
{{'common.role' | translate}}
+ +
+ + + +
+
{{'common.position' | translate}}
+ +
+ + + +
+
{{'common.created_at' | translate}}
+
+ + + +
+
{{'common.modified_at' | translate}}
+
+ + + +
+
{{'common.actions' | translate}}
+
+ + + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + + + + +
+ + + + + {{'common.id' | translate}}: + + + {{shortRoleName.id}} + + + {{shortRoleName.id}} + + + + + + {{'common.name' | translate}}: + + + + + + {{shortRoleName.shortName}} + + + + + + {{'common.role' | translate}}: + + + + + + {{shortRoleName.roleName}} + + + + + + {{'common.position' | translate}}: + + + + + + {{shortRoleName.position}} + + + + + + {{'common.created_at' | translate}}: + + + {{shortRoleName.createdAt | date:'dd.MM.yy HH:mm'}} + + + {{shortRoleName.createdAt | date:'dd.MM.yy HH:mm'}} + + + + + {{'common.modified_at' | translate}}: + + + {{shortRoleName.modifiedAt | date:'dd.MM.yy HH:mm'}} + + + {{shortRoleName.modifiedAt | date:'dd.MM.yy HH:mm'}} + + + + +
+ + + + + + +
+ + +
+ + + + + {{'common.no_entries_found' | translate}} + + + + + + +
+
+
+ diff --git a/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts index b22c1ae9..cd254446 100644 --- a/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts +++ b/kdb-web/src/app/modules/view/server/short-role-name/components/short-role-names/short-role-names.component.ts @@ -1,22 +1,68 @@ -import { Component, OnInit } from "@angular/core"; +import { Component, OnDestroy, OnInit } from "@angular/core"; import { AuthService } from "../../../../../../services/auth/auth.service"; import { SpinnerService } from "../../../../../../services/spinner/spinner.service"; import { ToastService } from "../../../../../../services/toast/toast.service"; import { ConfirmationDialogService } from "../../../../../../services/confirmation-dialog/confirmation-dialog.service"; -import { FormBuilder } from "@angular/forms"; +import { FormBuilder, FormControl, FormGroup } from "@angular/forms"; import { TranslateService } from "@ngx-translate/core"; import { DataService } from "../../../../../../services/data/data.service"; import { SidebarService } from "../../../../../../services/sidebar/sidebar.service"; import { ActivatedRoute } from "@angular/router"; import { Server } from "../../../../../../models/data/server.model"; +import { ComponentWithTable } from "../../../../../../base/component-with-table"; +import { ShortRoleName, ShortRoleNameFilter } from "../../../../../../models/data/short_role_name.model"; +import { Page } from "../../../../../../models/graphql/filter/page.model"; +import { Sort, SortDirection } from "../../../../../../models/graphql/filter/sort.model"; +import { Subject, throwError } from "rxjs"; +import { UserDTO } from "../../../../../../models/auth/auth-user.dto"; +import { Queries } from "../../../../../../models/graphql/queries.model"; +import { ShortRoleNameListQuery, Query, SingleDiscordQuery, ShortRoleNamePositionsQuery } from "../../../../../../models/graphql/query.model"; +import { catchError, debounceTime, takeUntil } from "rxjs/operators"; +import { LazyLoadEvent, MenuItem } from "primeng/api"; +import { Table } from "primeng/table"; +import { User } from "../../../../../../models/data/user.model"; +import { ShortRoleNameMutationResult, UpdateUserMutationResult } from "../../../../../../models/graphql/result.model"; +import { Mutations } from "../../../../../../models/graphql/mutations.model"; @Component({ - selector: 'app-short-role-names', - templateUrl: './short-role-names.component.html', - styleUrls: ['./short-role-names.component.scss'] + selector: "app-short-role-names", + templateUrl: "./short-role-names.component.html", + styleUrls: ["./short-role-names.component.scss"] }) -export class ShortRoleNamesComponent implements OnInit { +export class ShortRoleNamesComponent extends ComponentWithTable implements OnInit, OnDestroy { + public shortRoleNames: ShortRoleName[] = []; + public loading = true; + + public isEditingNew: boolean = false; + + public filterForm!: FormGroup<{ + id: FormControl, + shortName: FormControl, + roleId: FormControl, + position: FormControl, + }>; + + public filter: ShortRoleNameFilter = {}; + public page: Page = { + pageSize: undefined, + pageIndex: undefined + }; + public sort: Sort = { + sortColumn: undefined, + sortDirection: undefined + }; + + public totalRecords: number = 0; + + public clonedShortRoleNames: { [s: string]: ShortRoleName; } = {}; + + private unsubscriber = new Subject(); private server: Server = {}; + public user: UserDTO | null = null; + + query: string = Queries.shortRoleNameWithHistoryQuery; + roles: MenuItem[] = []; + positions: MenuItem[] = []; public constructor( private authService: AuthService, @@ -29,11 +75,222 @@ export class ShortRoleNamesComponent implements OnInit { private sidebar: SidebarService, private route: ActivatedRoute ) { + super("short-role-names", ["id", "name", "role", "position"]); } public ngOnInit(): void { + this.setFilterForm(); this.data.getServerFromRoute(this.route).then(async server => { this.server = server; + this.loadNextPage(); + + this.spinner.showSpinner(); + this.data.query(Queries.guildsQuery, { + id: server?.discordId + } + ).subscribe(data => { + if (data.discord.guilds) { + this.roles = data.discord.guilds[0].roles + .map(x => { + return { label: x.name, value: x }; + }); + } + this.spinner.hideSpinner(); + }); + this.data.query(Queries.shortRoleNamePositionsQuery).subscribe(data => { + if (data.shortRoleNamePositions) { + this.positions = data.shortRoleNamePositions + .map(x => { + return { label: x, value: x }; + }); + } + this.spinner.hideSpinner(); + }); }); } + + public ngOnDestroy(): void { + this.unsubscriber.next(); + this.unsubscriber.complete(); + } + + public loadNextPage(): void { + this.loading = true; + this.data.query(Queries.shortRoleNameQuery, { + serverId: this.server.id, filter: this.filter, page: this.page, sort: this.sort + }, + (data: Query) => { + return data.servers[0]; + } + ).subscribe(data => { + this.totalRecords = data.shortRoleNameCount; + this.shortRoleNames = data.shortRoleNames; + this.spinner.hideSpinner(); + this.loading = false; + }); + } + + public setFilterForm(): void { + this.filterForm = this.fb.group({ + id: new FormControl(null), + shortName: new FormControl(null), + roleId: new FormControl(null), + position: new FormControl(null) + }); + + this.filterForm.valueChanges.pipe( + takeUntil(this.unsubscriber), + debounceTime(600) + ).subscribe(changes => { + if (changes.id) { + this.filter.id = changes.id; + } else { + this.filter.id = undefined; + } + + if (changes.shortName) { + this.filter.shortName = changes.shortName; + } else { + this.filter.shortName = undefined; + } + + if (changes.roleId) { + this.filter.roleId = changes.roleId; + } else { + this.filter.roleId = undefined; + } + + if (changes.position) { + this.filter.position = changes.position; + } else { + this.filter.position = undefined; + } + + if (this.page.pageSize) + this.page.pageSize = 10; + + if (this.page.pageIndex) + this.page.pageIndex = 0; + + this.loadNextPage(); + }); + } + + public newShortRoleNameTemplate: ShortRoleName = { + createdAt: "", + modifiedAt: "" + }; + + public nextPage(event: LazyLoadEvent): void { + this.page.pageSize = event.rows ?? 0; + if (event.first != null && event.rows != null) + this.page.pageIndex = event.first / event.rows; + this.sort.sortColumn = event.sortField ?? undefined; + this.sort.sortDirection = event.sortOrder === 1 ? SortDirection.ASC : event.sortOrder === -1 ? SortDirection.DESC : SortDirection.ASC; + + this.loadNextPage(); + } + + public resetFilters(): void { + this.filterForm.reset(); + } + + public onRowEditInit(table: Table, user: User, index: number): void { + this.clonedShortRoleNames[index] = { ...user }; + } + + public onRowEditSave(table: Table, newShortRoleName: ShortRoleName, index: number): void { + if (this.isEditingNew && JSON.stringify(newShortRoleName) === JSON.stringify(this.newShortRoleNameTemplate)) { + this.isEditingNew = false; + this.shortRoleNames.splice(index, 1); + return; + } + + if (!newShortRoleName.id && !this.isEditingNew || !newShortRoleName.shortName && !newShortRoleName.roleId && !newShortRoleName?.position) { + return; + } + + if (this.isEditingNew) { + this.spinner.showSpinner(); + this.data.mutation(Mutations.createShortRoleName, { + shortName: newShortRoleName.shortName, + roleId: newShortRoleName.roleId, + position: newShortRoleName.position, + serverId: this.server.id + } + ).pipe(catchError(err => { + this.isEditingNew = false; + this.spinner.hideSpinner(); + return throwError(err); + })).subscribe(result => { + this.isEditingNew = false; + this.spinner.hideSpinner(); + this.toastService.success(this.translate.instant("view.server.short_role_names.message.short_role_names_create"), this.translate.instant("view.server.short_role_names.message.short_role_names_create_d", { name: result.shortRoleName.createShortRoleName?.shortName })); + this.loadNextPage(); + }); + return; + } + + this.spinner.showSpinner(); + this.data.mutation(Mutations.updateShortRoleName, { + id: newShortRoleName.id, + shortName: newShortRoleName.shortName, + roleId: newShortRoleName.roleId, + position: newShortRoleName.position + } + ).pipe(catchError(err => { + this.spinner.hideSpinner(); + return throwError(err); + })).subscribe(_ => { + this.spinner.hideSpinner(); + this.toastService.success(this.translate.instant("view.server.short_role_names.message.short_role_names_update"), this.translate.instant("view.server.short_role_names.message.short_role_names_update_d", { name: newShortRoleName.shortName })); + this.loadNextPage(); + }); + + } + + public onRowEditCancel(index: number): void { + if (this.isEditingNew) { + this.shortRoleNames.splice(index, 1); + delete this.clonedShortRoleNames[index]; + this.isEditingNew = false; + return; + } + + this.shortRoleNames[index] = this.clonedShortRoleNames[index]; + delete this.clonedShortRoleNames[index]; + } + + public deleteShortRoleName(shortRoleName: ShortRoleName): void { + this.confirmDialog.confirmDialog( + this.translate.instant("view.server.short_role_names.message.short_role_names_delete"), this.translate.instant("view.server.short_role_names.message.short_role_names_delete_q", { name: shortRoleName.shortName }), + () => { + this.spinner.showSpinner(); + this.data.mutation(Mutations.deleteShortRoleName, { + id: shortRoleName.id + } + ).pipe(catchError(err => { + this.spinner.hideSpinner(); + return throwError(err); + })).subscribe(l => { + this.spinner.hideSpinner(); + this.toastService.success(this.translate.instant("view.server.short_role_names.message.short_role_names_deleted"), this.translate.instant("view.server.short_role_names.message.short_role_names_deleted_d", { name: shortRoleName.shortName })); + this.loadNextPage(); + }); + }); + } + + public addShortRoleName(table: Table): void { + const newShortRoleName = JSON.parse(JSON.stringify(this.newShortRoleNameTemplate)); + + this.shortRoleNames = [newShortRoleName, ...this.shortRoleNames]; + + table.initRowEdit(newShortRoleName); + + const index = this.shortRoleNames.findIndex(l => l.id == newShortRoleName.id); + this.onRowEditInit(table, newShortRoleName, index); + + this.isEditingNew = true; + } + } diff --git a/kdb-web/src/app/modules/view/server/short-role-name/short-role-name.module.ts b/kdb-web/src/app/modules/view/server/short-role-name/short-role-name.module.ts index f35bd9ec..b675df35 100644 --- a/kdb-web/src/app/modules/view/server/short-role-name/short-role-name.module.ts +++ b/kdb-web/src/app/modules/view/server/short-role-name/short-role-name.module.ts @@ -2,6 +2,12 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ShortRoleNamesComponent } from './components/short-role-names/short-role-names.component'; import { ShortRoleNameRoutingModule } from "./short-role-name-routing.module"; +import { ButtonModule } from "primeng/button"; +import { InputTextModule } from "primeng/inputtext"; +import { ReactiveFormsModule } from "@angular/forms"; +import { SharedModule } from "../../../shared/shared.module"; +import { TableModule } from "primeng/table"; +import { TranslateModule } from "@ngx-translate/core"; @@ -11,7 +17,14 @@ import { ShortRoleNameRoutingModule } from "./short-role-name-routing.module"; ], imports: [ CommonModule, - ShortRoleNameRoutingModule + ShortRoleNameRoutingModule, + ButtonModule, + InputTextModule, + ReactiveFormsModule, + SharedModule, + SharedModule, + TableModule, + TranslateModule ] }) export class ShortRoleNameModule { } diff --git a/kdb-web/src/assets/i18n/de.json b/kdb-web/src/assets/i18n/de.json index 24570a8e..b6ba456e 100644 --- a/kdb-web/src/assets/i18n/de.json +++ b/kdb-web/src/assets/i18n/de.json @@ -183,6 +183,11 @@ "operator": "Operator", "password": "Passwort", "permissions": "Rechte", + "position": "Position", + "positions": { + "after": "Hinten", + "before": "Vorne" + }, "reset_filters": "Filter zurücksetzen", "role": "Rolle", "rule_count": "Regeln", @@ -310,14 +315,14 @@ "dashboard": "Dashboard", "members": "Mitglieder", "server": { - "short_role_names": "Rollen Kürzel", "achievements": "Errungenschaften", "auto_roles": "Auto Rollen", "configuration": "Konfiguration", "dashboard": "Dashboard", "levels": "Level", "members": "Mitglieder", - "profile": "Dein Profil" + "profile": "Dein Profil", + "short_role_names": "Rollen Kürzel" }, "server_empty": "Kein Server ausgewählt", "settings": "Einstellungen", @@ -503,6 +508,26 @@ "permission_denied": "Zugriff verweigert!", "permission_denied_d": "Du musst Moderator sein, um andere Profile sehen zu können!", "xp": "XP" + }, + "short_role_names": { + "header": "Rollen Kürzel", + "message": { + "short_role_names_create": "Rollen Kürzel erstellt", + "short_role_names_create_d": "Rollen Kürzel {{name}} erfolgreich erstellt", + "short_role_names_create_failed": "Rollen Kürzel Erstellung fehlgeschlagen", + "short_role_names_create_failed_d": "Die Erstellung des Rollen Kürzels ist fehlgeschlagen!", + "short_role_names_delete": "Rollen Kürzel löschen", + "short_role_names_delete_failed": "Rollen Kürzel Löschung fehlgeschlagen", + "short_role_names_delete_failed_d": "Die Löschung des Rollen Kürzels {{name}} ist fehlgeschlagen!", + "short_role_names_delete_q": "Sind Sie sich sicher, dass Sie das Rollen Kürzel {{name}} löschen möchten?", + "short_role_names_deleted": "Rollen Kürzel gelöscht", + "short_role_names_deleted_d": "Rollen Kürzel {{name}} erfolgreich gelöscht", + "short_role_names_update": "Rollen Kürzel bearbeitet", + "short_role_names_update_d": "Rollen Kürzel {{name}} erfolgreich bearbeitet", + "short_role_names_update_failed": "Rollen Kürzel Bearbeitung fehlgeschlagen", + "short_role_names_update_failed_d": "Die Bearbeitung des Levels ist fehlgeschlagen!" + }, + "short_role_names": "Rollen Kürzel" } }, "user_settings": { diff --git a/kdb-web/src/assets/i18n/en.json b/kdb-web/src/assets/i18n/en.json index c19e61bf..4c647124 100644 --- a/kdb-web/src/assets/i18n/en.json +++ b/kdb-web/src/assets/i18n/en.json @@ -183,6 +183,11 @@ "operator": "Operator", "password": "Password", "permissions": "Permissions", + "position": "Position", + "positions": { + "after": "After", + "before": "Before" + }, "reset_filters": "Reset filters", "role": "Role", "rule_count": "Rules", @@ -316,7 +321,8 @@ "dashboard": "Dashboard", "levels": "Level", "members": "Members", - "profile": "Your profile" + "profile": "Your profile", + "short_role_names": "Short role names" }, "server_empty": "No server selected", "settings": "Settings", @@ -502,6 +508,26 @@ "permission_denied": "Access denied!", "permission_denied_d": "You have to be moderator to see other profiles!", "xp": "XP" + }, + "short_role_names": { + "header": "Level", + "message": { + "short_role_names_create": "Short role name created", + "short_role_names_create_d": "Short role name {{name}} successfully created", + "short_role_names_create_failed": "Short role name creation failed", + "short_role_names_create_failed_d": "Creation of short role name failed!", + "short_role_names_delete": "Delete short role name", + "short_role_names_delete_failed": "Short role name deletion failed", + "short_role_names_delete_failed_d": "Deletion of short role name {{name}} failed!", + "short_role_names_delete_q": "Are you sure you want to delete the {{name}} short role name?", + "short_role_names_deleted": "Short role name deleted", + "short_role_names_deleted_d": "Short role name {{name}} successfully deleted\t", + "short_role_names_update": "Short role name edited", + "short_role_names_update_d": "Short role name {{name}} edited successfully", + "short_role_names_update_failed": "Short role name editing failed", + "short_role_names_update_failed_d": "Short role name editing failed!" + }, + "short_role_names": "Level" } }, "user_settings": { -- 2.45.2 From 3546d38f752f27294901b8033fffa8a79db25269 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 15:14:38 +0200 Subject: [PATCH 21/24] Added flag check to hide pages #378 --- kdb-bot/src/bot_graphql/graphql/server.gql | 2 +- .../src/bot_graphql/queries/server_query.py | 5 +- kdb-web/src/app/models/data/server.model.ts | 4 +- .../src/app/models/graphql/queries.model.ts | 5 +- kdb-web/src/app/models/graphql/query.model.ts | 3 +- kdb-web/src/app/services/server.service.ts | 9 +- .../app/services/sidebar/sidebar.service.ts | 346 ++++++++++-------- 7 files changed, 218 insertions(+), 156 deletions(-) diff --git a/kdb-bot/src/bot_graphql/graphql/server.gql b/kdb-bot/src/bot_graphql/graphql/server.gql index 6b29f0f9..2dda4cef 100644 --- a/kdb-bot/src/bot_graphql/graphql/server.gql +++ b/kdb-bot/src/bot_graphql/graphql/server.gql @@ -35,7 +35,7 @@ type Server implements TableWithHistoryQuery { shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName] config: ServerConfig - hasFeatureFlag(flag: String): Boolean + hasFeatureFlag(flag: String): FeatureFlag createdAt: String modifiedAt: String diff --git a/kdb-bot/src/bot_graphql/queries/server_query.py b/kdb-bot/src/bot_graphql/queries/server_query.py index 3690c37f..6ba77149 100644 --- a/kdb-bot/src/bot_graphql/queries/server_query.py +++ b/kdb-bot/src/bot_graphql/queries/server_query.py @@ -103,4 +103,7 @@ class ServerQuery(DataQueryWithHistoryABC): settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{server.discord_id}") if "flag" not in kwargs: return False - return FeatureFlagsSettings.get_flag_from_dict(settings.feature_flags, FeatureFlagsEnum(kwargs["flag"])) + return { + "key": kwargs["flag"], + "value": FeatureFlagsSettings.get_flag_from_dict(settings.feature_flags, FeatureFlagsEnum(kwargs["flag"])), + } diff --git a/kdb-web/src/app/models/data/server.model.ts b/kdb-web/src/app/models/data/server.model.ts index fb2d2864..483a6e46 100644 --- a/kdb-web/src/app/models/data/server.model.ts +++ b/kdb-web/src/app/models/data/server.model.ts @@ -4,6 +4,7 @@ import {Level} from "./level.model"; import {Client} from "./client.model"; import { AutoRole } from "./auto_role.model"; import { ServerConfig } from "../config/server-config.model"; +import { FeatureFlag } from "../config/feature-flags.model"; export interface GameServer { id?: number; @@ -24,7 +25,8 @@ export interface Server extends Data { userCount?: number; users?: User[]; config?: ServerConfig; - hasFeatureFlag?: boolean; + hasFeatureFlag?: FeatureFlag; + activeFeatureFlags?: FeatureFlag[]; } export interface ServerFilter { diff --git a/kdb-web/src/app/models/graphql/queries.model.ts b/kdb-web/src/app/models/graphql/queries.model.ts index 1f069b6b..51d51e2e 100644 --- a/kdb-web/src/app/models/graphql/queries.model.ts +++ b/kdb-web/src/app/models/graphql/queries.model.ts @@ -85,7 +85,10 @@ export class Queries { static hasServerFeatureFlag = ` query HasServerFeatureFlag($filter: ServerFilter, $flag: String) { servers(filter: $filter) { - hasFeatureFlag(flag: $flag) + hasFeatureFlag(flag: $flag) { + key + value + } } } `; diff --git a/kdb-web/src/app/models/graphql/query.model.ts b/kdb-web/src/app/models/graphql/query.model.ts index 332a63f9..7fc95684 100644 --- a/kdb-web/src/app/models/graphql/query.model.ts +++ b/kdb-web/src/app/models/graphql/query.model.ts @@ -7,6 +7,7 @@ import { Achievement, AchievementAttribute } from "../data/achievement.model"; import { TechnicianConfig } from "../config/technician-config.model"; import { ServerConfig } from "../config/server-config.model"; import { ShortRoleName } from "../data/short_role_name.model"; +import { FeatureFlag } from "../config/feature-flags.model"; export interface Query { serverCount: number; @@ -66,7 +67,7 @@ export interface PossibleFeatureFlagsQuery { } export interface HasServerFeatureFlagQuery { - hasFeatureFlag: boolean; + hasFeatureFlag: FeatureFlag; } export interface ShortRoleNameListQuery { diff --git a/kdb-web/src/app/services/server.service.ts b/kdb-web/src/app/services/server.service.ts index b01a608a..594ec34c 100644 --- a/kdb-web/src/app/services/server.service.ts +++ b/kdb-web/src/app/services/server.service.ts @@ -9,7 +9,7 @@ import { NavigationEnd, Router } from "@angular/router"; export class ServerService { - server$ = new BehaviorSubject(null); + server$ = new BehaviorSubject(undefined); constructor( private router: Router @@ -19,16 +19,17 @@ export class ServerService { return; } if (!event.url.startsWith("/server/") && this.server$.value) { - this.setServer(null); + this.setServer(undefined); } }); } - setServer(server: Server | null) { + setServer(server: Server | undefined) { if (!server) { - this.server$.next(server); + this.server$.next(undefined); return; } + if (server.id != this.server$.value?.id) { this.server$.next(server); } diff --git a/kdb-web/src/app/services/sidebar/sidebar.service.ts b/kdb-web/src/app/services/sidebar/sidebar.service.ts index a2e05f05..4b4ace21 100644 --- a/kdb-web/src/app/services/sidebar/sidebar.service.ts +++ b/kdb-web/src/app/services/sidebar/sidebar.service.ts @@ -1,6 +1,6 @@ import { Injectable } from "@angular/core"; import { MenuItem } from "primeng/api"; -import { BehaviorSubject } from "rxjs"; +import { BehaviorSubject, forkJoin, Observable } from "rxjs"; import { AuthRoles } from "../../models/auth/auth-roles.enum"; import { AuthService } from "../auth/auth.service"; import { TranslateService } from "@ngx-translate/core"; @@ -9,170 +9,222 @@ import { ThemeService } from "../theme/theme.service"; import { Server } from "../../models/data/server.model"; import { UserDTO } from "../../models/auth/auth-user.dto"; import { ServerService } from "../server.service"; +import { HasServerFeatureFlagQuery, PossibleFeatureFlagsQuery, Query } from "../../models/graphql/query.model"; +import { Queries } from "../../models/graphql/queries.model"; +import { DataService } from "../data/data.service"; +import { FeatureFlag } from "../../models/config/feature-flags.model"; @Injectable({ - providedIn: "root" + providedIn: "root" }) export class SidebarService { - isSidebarOpen: boolean = true; - menuItems$ = new BehaviorSubject(new Array()); - server!: Server | null; + isSidebarOpen: boolean = true; + menuItems$ = new BehaviorSubject(new Array()); + server!: Server | undefined; - dashboard: MenuItem = {}; - serverDashboard: MenuItem = {}; - serverProfile: MenuItem = {}; - serverMembers: MenuItem = {}; - serverAutoRoles: MenuItem = {}; - serverLevels: MenuItem = {}; - serverAchievements: MenuItem = {}; - serverShortRoleNames: MenuItem = {}; - serverConfig: MenuItem = {}; - serverMenu: MenuItem = {}; - adminConfig: MenuItem = {}; - adminUsers: MenuItem = {}; - adminMenu: MenuItem = {}; + dashboard: MenuItem = {}; + serverDashboard: MenuItem = {}; + serverProfile: MenuItem = {}; + serverMembers: MenuItem = {}; + serverAutoRoles: MenuItem = {}; + serverLevels: MenuItem = {}; + serverAchievements: MenuItem = {}; + serverShortRoleNames: MenuItem = {}; + serverConfig: MenuItem = {}; + serverMenu: MenuItem = {}; + adminConfig: MenuItem = {}; + adminUsers: MenuItem = {}; + adminMenu: MenuItem = {}; - constructor( - private themeService: ThemeService, - private authService: AuthService, - private translateService: TranslateService, - private router: Router, - private serverService: ServerService - ) { - this.themeService.isSidebarOpen$.subscribe(value => { - this.isSidebarOpen = value; - this.setMenu(true); - }); + featureFlags: FeatureFlag[] = []; - this.translateService.onLangChange.subscribe(_ => { - this.setMenu(true); - }); + constructor( + private themeService: ThemeService, + private authService: AuthService, + private translateService: TranslateService, + private router: Router, + private serverService: ServerService, + private data: DataService + ) { + this.themeService.isSidebarOpen$.subscribe(value => { + this.isSidebarOpen = value; + this.setMenu(true); + }); - this.serverService.server$.subscribe(server => { - this.server = server; - if (server) { - this.setMenu(true); - } else { - this.setMenu(false); - } - }); - } + this.translateService.onLangChange.subscribe(_ => { + this.setMenu(true); + }); - async buildMenu(user: UserDTO | null, hasPermission: boolean, isTechnician: boolean = false) { - this.dashboard = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.dashboard") : "", - icon: "pi pi-th-large", - routerLink: "dashboard" - }; - this.serverDashboard = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.dashboard") : "", - icon: "pi pi-th-large", - routerLink: `server/${this.server?.id}` - }; - this.serverProfile = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.profile") : "", - icon: "pi pi-id-card", - routerLink: `server/${this.server?.id}/members/${user?.id}` - }; - this.serverMembers = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.members") : "", - icon: "pi pi-users", - visible: true, - routerLink: `server/${this.server?.id}/members` - }; + this.serverService.server$.subscribe(server => { + this.server = server; + if (server) { + this.setMenu(true); + } else { + this.setMenu(false); + } + }); + } - this.serverAutoRoles = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.auto_roles") : "", - icon: "pi pi-sitemap", - visible: true, - routerLink: `server/${this.server?.id}/auto-roles` - }; + async buildMenu(user: UserDTO | null, hasPermission: boolean, isTechnician: boolean = false) { + this.dashboard = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.dashboard") : "", + icon: "pi pi-th-large", + routerLink: "dashboard" + }; + this.serverDashboard = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.dashboard") : "", + icon: "pi pi-th-large", + routerLink: `server/${this.server?.id}` + }; + this.serverProfile = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.profile") : "", + icon: "pi pi-id-card", + routerLink: `server/${this.server?.id}/members/${user?.id}` + }; + this.serverMembers = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.members") : "", + icon: "pi pi-users", + visible: true, + routerLink: `server/${this.server?.id}/members` + }; - this.serverLevels = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.levels") : "", - icon: "pi pi-book", - visible: true, - routerLink: `server/${this.server?.id}/levels` - }; + this.serverAutoRoles = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.auto_roles") : "", + icon: "pi pi-sitemap", + visible: true, + routerLink: `server/${this.server?.id}/auto-roles` + }; - this.serverAchievements = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.achievements") : "", - icon: "pi pi-angle-double-up", - visible: true, - routerLink: `server/${this.server?.id}/achievements` - }; + this.serverLevels = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.levels") : "", + icon: "pi pi-book", + visible: true, + routerLink: `server/${this.server?.id}/levels` + }; - this.serverShortRoleNames = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.short_role_names") : "", - icon: "pi pi-list", - visible: true, - routerLink: `server/${this.server?.id}/short-role-names` - }; + this.serverAchievements = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.achievements") : "", + icon: "pi pi-angle-double-up", + visible: true, + routerLink: `server/${this.server?.id}/achievements` + }; - this.serverConfig = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.configuration") : "", - icon: "pi pi-cog", - visible: true, - routerLink: `server/${this.server?.id}/config` - }; + this.serverShortRoleNames = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.short_role_names") : "", + icon: "pi pi-list", + visible: true, + routerLink: `server/${this.server?.id}/short-role-names` + }; - this.serverMenu = { - label: this.isSidebarOpen ? this.server?.name : "", - icon: "pi pi-server", - visible: false, - expanded: true, - items: [this.serverDashboard, this.serverProfile, this.serverMembers, this.serverAutoRoles, this.serverLevels, this.serverAchievements, this.serverShortRoleNames, this.serverConfig] - }; - this.adminConfig = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.config") : "", - visible: hasPermission || isTechnician, - icon: "pi pi-cog", - routerLink: "/admin/settings" - }; - this.adminUsers = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.auth_user_list") : "", - visible: hasPermission, - icon: "pi pi-user-edit", - routerLink: "/admin/users" - }; - this.adminMenu = { - label: this.isSidebarOpen ? this.translateService.instant("sidebar.administration") : "", - icon: "pi pi-cog", - visible: hasPermission || isTechnician, - expanded: true, - items: [this.adminConfig, this.adminUsers] - }; - } + this.serverConfig = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.configuration") : "", + icon: "pi pi-cog", + visible: true, + routerLink: `server/${this.server?.id}/config` + }; - setMenu(build: boolean = false) { - this.authService.hasUserPermission(AuthRoles.Admin).then(async hasPermission => { - let authUser = await this.authService.getLoggedInUser(); - let user: UserDTO | null = authUser?.users?.find(u => u.server == this.server?.id) ?? null; - let isTechnician = authUser?.users?.map(u => u.isTechnician).filter(u => u) ?? []; + this.serverMenu = { + label: this.isSidebarOpen ? this.server?.name : "", + icon: "pi pi-server", + visible: false, + expanded: true, + items: [this.serverDashboard, this.serverProfile, this.serverMembers, this.serverAutoRoles, this.serverLevels, this.serverAchievements, this.serverShortRoleNames, this.serverConfig] + }; + this.adminConfig = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.config") : "", + visible: hasPermission || isTechnician, + icon: "pi pi-cog", + routerLink: "/admin/settings" + }; + this.adminUsers = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.auth_user_list") : "", + visible: hasPermission, + icon: "pi pi-user-edit", + routerLink: "/admin/users" + }; + this.adminMenu = { + label: this.isSidebarOpen ? this.translateService.instant("sidebar.administration") : "", + icon: "pi pi-cog", + visible: hasPermission || isTechnician, + expanded: true, + items: [this.adminConfig, this.adminUsers] + }; + } - if (build || this.menuItems$.value.length == 0) { - await this.buildMenu(user, hasPermission, isTechnician.length > 0); - } + setMenu(build: boolean = false) { + const server = this.server; - if (this.server) { - this.serverMenu.visible = true; - this.serverMembers.visible = !!user?.isModerator; - this.serverAutoRoles.visible = !!user?.isModerator; - this.serverLevels.visible = !!user?.isModerator; - this.serverAchievements.visible = !!user?.isModerator; - this.serverShortRoleNames.visible = !!user?.isAdmin; - this.serverConfig.visible = !!user?.isAdmin || isTechnician.length > 0; - } else { - this.serverMenu.visible = false; - } + if (server) { + this.featureFlags = []; + this.data.query("{possibleFeatureFlags}" + ).subscribe(data => { + let observables: Observable[] = []; + data.possibleFeatureFlags.forEach(flag => { + observables.push( + this.data.query(Queries.hasServerFeatureFlag, { + filter: { id: server.id }, + flag: flag + }, + function(data: Query) { + return data.servers[0]; + } + ) + ); + }); - let menuItems: MenuItem[] = [ - this.dashboard, - this.serverMenu, - this.adminMenu - ]; - this.menuItems$.next(menuItems); - }); - } + forkJoin(observables).subscribe(data => { + data.forEach(flag => { + if (!flag.hasFeatureFlag.value) { + return; + } + this.featureFlags.push(flag.hasFeatureFlag); + }); + this._setMenu(build); + }); + }); + } else { + this._setMenu(build); + } + } + + private _setMenu(build: boolean = false) { + this.authService.hasUserPermission(AuthRoles.Admin).then(async hasPermission => { + let authUser = await this.authService.getLoggedInUser(); + let user: UserDTO | null = authUser?.users?.find(u => u.server == this.server?.id) ?? null; + let isTechnician = authUser?.users?.map(u => u.isTechnician).filter(u => u) ?? []; + + if (build || this.menuItems$.value.length == 0) { + await this.buildMenu(user, hasPermission, isTechnician.length > 0); + } + + if (this.server) { + this.serverMenu.visible = true; + this.serverMembers.visible = !!user?.isModerator; + this.serverAutoRoles.visible = this.hasFeature("AutoRoleModule") ? !!user?.isModerator : false; + this.serverLevels.visible = this.hasFeature("LevelModule") ? !!user?.isModerator : false; + this.serverAchievements.visible = this.hasFeature("AchievementsModule") ? !!user?.isModerator : false; + this.serverShortRoleNames.visible = this.hasFeature("ShortRoleNameModule") ? !!user?.isAdmin : false; + + this.serverConfig.visible = !!user?.isAdmin || isTechnician.length > 0; + } else { + this.serverMenu.visible = false; + } + + let menuItems: MenuItem[] = [ + this.dashboard, + this.serverMenu, + this.adminMenu + ]; + this.menuItems$.next(menuItems); + }); + } + + private hasFeature(key: string): boolean { + const flag = this.featureFlags.filter(flag => flag.key == key); + if (flag.length == 0) { + return false; + } + return flag[0].value; + } } -- 2.45.2 From 0cc8d6f2c7c29c840ee3a2043e4939570b71b1c5 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 17:00:30 +0200 Subject: [PATCH 22/24] Added discord impl #378 --- kdb-bot/cpl-workspace.json | 1 + kdb-bot/src/bot/bot.json | 1 + kdb-bot/src/bot/module_list.py | 2 + .../configuration/feature_flags_enum.py | 1 + .../configuration/feature_flags_settings.py | 3 +- .../service/data_integrity_service.py | 3 - .../abc/short_role_name_repository_abc.py | 3 +- .../short_role_name_repository_service.py | 12 +-- kdb-bot/src/bot_graphql/graphql_module.py | 3 - .../mutations/short_role_name_mutation.py | 2 +- .../src/modules/short_role_name/__init__.py | 26 +++++++ .../short_role_name/events/__init__.py | 26 +++++++ .../short_role_name_on_member_update_event.py | 14 ++++ .../short_role_name/service/__init__.py | 26 +++++++ .../service/short_role_name_service.py | 76 +++++++++++++++++++ .../short_role_name/short-role-name.json | 46 +++++++++++ .../short_role_name/short_role_name_module.py | 28 +++++++ .../short_role_name/short_role_name_seeder.py | 21 +++++ .../app/services/sidebar/sidebar.service.ts | 2 +- 19 files changed, 280 insertions(+), 16 deletions(-) create mode 100644 kdb-bot/src/modules/short_role_name/__init__.py create mode 100644 kdb-bot/src/modules/short_role_name/events/__init__.py create mode 100644 kdb-bot/src/modules/short_role_name/events/short_role_name_on_member_update_event.py create mode 100644 kdb-bot/src/modules/short_role_name/service/__init__.py create mode 100644 kdb-bot/src/modules/short_role_name/service/short_role_name_service.py create mode 100644 kdb-bot/src/modules/short_role_name/short-role-name.json create mode 100644 kdb-bot/src/modules/short_role_name/short_role_name_module.py create mode 100644 kdb-bot/src/modules/short_role_name/short_role_name_seeder.py diff --git a/kdb-bot/cpl-workspace.json b/kdb-bot/cpl-workspace.json index 29d7ef29..e333b19b 100644 --- a/kdb-bot/cpl-workspace.json +++ b/kdb-bot/cpl-workspace.json @@ -16,6 +16,7 @@ "level": "src/modules/level/level.json", "permission": "src/modules/permission/permission.json", "technician": "src/modules/technician/technician.json", + "short-role-name": "src/modules/_short_role_name/modules/short-role-name.json", "checks": "tools/checks/checks.json", "get-version": "tools/get_version/get-version.json", "post-build": "tools/post_build/post-build.json", diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index 994ad073..d59036c8 100644 --- a/kdb-bot/src/bot/bot.json +++ b/kdb-bot/src/bot/bot.json @@ -68,6 +68,7 @@ "../modules/database/database.json", "../modules/level/level.json", "../modules/permission/permission.json", + "../modules/short_role_name/short-role-name.json", "../modules/technician/technician.json" ] } diff --git a/kdb-bot/src/bot/module_list.py b/kdb-bot/src/bot/module_list.py index 3e5fea34..810a0851 100644 --- a/kdb-bot/src/bot/module_list.py +++ b/kdb-bot/src/bot/module_list.py @@ -13,6 +13,7 @@ from modules.config.config_module import ConfigModule from modules.database.database_module import DatabaseModule from modules.level.level_module import LevelModule from modules.permission.permission_module import PermissionModule +from modules.short_role_name.short_role_name_module import ShortRoleNameModule from modules.technician.technician_module import TechnicianModule @@ -35,6 +36,7 @@ class ModuleList: ApiModule, TechnicianModule, AchievementsModule, + ShortRoleNameModule, # has to be last! BootLogModule, CoreExtensionModule, diff --git a/kdb-bot/src/bot_core/configuration/feature_flags_enum.py b/kdb-bot/src/bot_core/configuration/feature_flags_enum.py index a370ef41..c267ccc4 100644 --- a/kdb-bot/src/bot_core/configuration/feature_flags_enum.py +++ b/kdb-bot/src/bot_core/configuration/feature_flags_enum.py @@ -23,3 +23,4 @@ class FeatureFlagsEnum(Enum): version_in_presence = "VersionInPresence" game_server = "GameServer" sync_xp = "SyncXp" + short_role_name = "ShortRoleName" diff --git a/kdb-bot/src/bot_core/configuration/feature_flags_settings.py b/kdb-bot/src/bot_core/configuration/feature_flags_settings.py index bf125e54..51f8d924 100644 --- a/kdb-bot/src/bot_core/configuration/feature_flags_settings.py +++ b/kdb-bot/src/bot_core/configuration/feature_flags_settings.py @@ -18,13 +18,14 @@ class FeatureFlagsSettings(ConfigurationModelABC): FeatureFlagsEnum.moderator_module.value: False, # 02.10.2022 #48 FeatureFlagsEnum.permission_module.value: True, # 02.10.2022 #48 FeatureFlagsEnum.config_module.value: True, # 19.07.2023 #127 - FeatureFlagsEnum.short_role_name_module.value: False, # 28.09.2023 #378 + FeatureFlagsEnum.short_role_name_module.value: True, # 28.09.2023 #378 # features FeatureFlagsEnum.api_only.value: False, # 13.10.2022 #70 FeatureFlagsEnum.presence.value: True, # 03.10.2022 #56 FeatureFlagsEnum.version_in_presence.value: False, # 21.03.2023 #253 FeatureFlagsEnum.game_server.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 } def __init__(self, **kwargs: dict): diff --git a/kdb-bot/src/bot_core/service/data_integrity_service.py b/kdb-bot/src/bot_core/service/data_integrity_service.py index 8290cb88..9a2e613e 100644 --- a/kdb-bot/src/bot_core/service/data_integrity_service.py +++ b/kdb-bot/src/bot_core/service/data_integrity_service.py @@ -24,7 +24,6 @@ from bot_data.model.server_config import ServerConfig from bot_data.model.user import User from bot_data.model.user_joined_server import UserJoinedServer from bot_data.model.user_joined_voice_channel import UserJoinedVoiceChannel -from bot_data.service.seeder_service import SeederService from bot_data.service.user_repository_service import ServerRepositoryABC from modules.achievements.achievement_service import AchievementService @@ -34,7 +33,6 @@ class DataIntegrityService: self, config: ConfigurationABC, logger: DatabaseLogger, - seeder: SeederService, bot: DiscordBotServiceABC, db_context: DatabaseContextABC, server_repo: ServerRepositoryABC, @@ -51,7 +49,6 @@ class DataIntegrityService: self._config = config self._logger = logger - self._seeder = seeder self._bot = bot self._db_context = db_context self._servers = server_repo diff --git a/kdb-bot/src/bot_data/abc/short_role_name_repository_abc.py b/kdb-bot/src/bot_data/abc/short_role_name_repository_abc.py index 9ebcaf8f..f0034a6e 100644 --- a/kdb-bot/src/bot_data/abc/short_role_name_repository_abc.py +++ b/kdb-bot/src/bot_data/abc/short_role_name_repository_abc.py @@ -1,5 +1,4 @@ from abc import ABC, abstractmethod -from typing import Optional from cpl_query.extension import List @@ -20,7 +19,7 @@ class ShortRoleNameRepositoryABC(ABC): pass @abstractmethod - def find_short_role_name_by_role_id(self, role_id: int) -> Optional[ShortRoleName]: + def find_short_role_names_by_role_id(self, role_id: int) -> List[ShortRoleName]: pass @abstractmethod diff --git a/kdb-bot/src/bot_data/service/short_role_name_repository_service.py b/kdb-bot/src/bot_data/service/short_role_name_repository_service.py index 855abea3..fa65077e 100644 --- a/kdb-bot/src/bot_data/service/short_role_name_repository_service.py +++ b/kdb-bot/src/bot_data/service/short_role_name_repository_service.py @@ -58,13 +58,15 @@ class ShortRoleNameRepositoryService(ShortRoleNameRepositoryABC): return self._short_role_name_from_result(result) - def find_short_role_name_by_role_id(self, role_id: int) -> Optional[ShortRoleName]: + def find_short_role_names_by_role_id(self, role_id: int) -> List[ShortRoleName]: + short_role_names = List(ShortRoleName) self._logger.trace(__name__, f"Send SQL command: {ShortRoleName.get_select_by_role_id_string(role_id)}") - result = self._context.select(ShortRoleName.get_select_by_role_id_string(role_id)) - if result is None or len(result) == 0: - return None + results = self._context.select(ShortRoleName.get_select_by_role_id_string(role_id)) + for result in results: + self._logger.trace(__name__, f"Get short_role_name with id {result[0]}") + short_role_names.append(self._short_role_name_from_result(result)) - return self._short_role_name_from_result(result[0]) + return short_role_names def get_short_role_names_by_server_id(self, server_id: int) -> List[ShortRoleName]: short_role_names = List(ShortRoleName) diff --git a/kdb-bot/src/bot_graphql/graphql_module.py b/kdb-bot/src/bot_graphql/graphql_module.py index e4e99a16..96c72797 100644 --- a/kdb-bot/src/bot_graphql/graphql_module.py +++ b/kdb-bot/src/bot_graphql/graphql_module.py @@ -5,7 +5,6 @@ from cpl_discord.service.discord_collection_abc import DiscordCollectionABC from bot_core.abc.module_abc import ModuleABC from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum -from bot_data.service.seeder_service import SeederService from bot_graphql.abc.filter_abc import FilterABC from bot_graphql.abc.query_abc import QueryABC from bot_graphql.filter.achievement_filter import AchievementFilter @@ -147,5 +146,3 @@ class GraphQLModule(ModuleABC): services.add_transient(QueryABC, UserJoinedGameServerMutation) services.add_transient(QueryABC, TechnicianConfigMutation) services.add_transient(QueryABC, ServerConfigMutation) - - services.add_transient(SeederService) diff --git a/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py b/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py index 3f3ca3af..cc996e18 100644 --- a/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py +++ b/kdb-bot/src/bot_graphql/mutations/short_role_name_mutation.py @@ -41,7 +41,7 @@ class ShortRoleNameMutation(QueryABC): server, ) - result = self._short_role_names.find_short_role_name_by_role_id(short_role_name.role_id) + result = self._short_role_names.find_short_role_names_by_role_id(short_role_name.role_id) if result is not None: raise ValueError("Short name for role already exists") diff --git a/kdb-bot/src/modules/short_role_name/__init__.py b/kdb-bot/src/modules/short_role_name/__init__.py new file mode 100644 index 00000000..3eccd514 --- /dev/null +++ b/kdb-bot/src/modules/short_role_name/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +""" +bot Keksdose bot +~~~~~~~~~~~~~~~~~~~ + +Discord bot for the Keksdose discord Server + +:copyright: (c) 2022 - 2023 sh-edraft.de +:license: MIT, see LICENSE for more details. + +""" + +__title__ = "modules.short_role_name" +__author__ = "Sven Heidemann" +__license__ = "MIT" +__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" +__version__ = "1.1.7" + +from collections import namedtuple + + +# imports + +VersionInfo = namedtuple("VersionInfo", "major minor micro") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/short_role_name/events/__init__.py b/kdb-bot/src/modules/short_role_name/events/__init__.py new file mode 100644 index 00000000..b0d72d7b --- /dev/null +++ b/kdb-bot/src/modules/short_role_name/events/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +""" +bot Keksdose bot +~~~~~~~~~~~~~~~~~~~ + +Discord bot for the Keksdose discord Server + +:copyright: (c) 2022 - 2023 sh-edraft.de +:license: MIT, see LICENSE for more details. + +""" + +__title__ = "modules.short_role_name.events" +__author__ = "Sven Heidemann" +__license__ = "MIT" +__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" +__version__ = "1.1.7" + +from collections import namedtuple + + +# imports + +VersionInfo = namedtuple("VersionInfo", "major minor micro") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/short_role_name/events/short_role_name_on_member_update_event.py b/kdb-bot/src/modules/short_role_name/events/short_role_name_on_member_update_event.py new file mode 100644 index 00000000..6b942ed1 --- /dev/null +++ b/kdb-bot/src/modules/short_role_name/events/short_role_name_on_member_update_event.py @@ -0,0 +1,14 @@ +import discord +from cpl_discord.events import OnMemberUpdateABC + +from modules.short_role_name.service.short_role_name_service import ShortRoleNameService + + +class ShortRoleNameOnMemberUpdateEvent(OnMemberUpdateABC): + def __init__(self, service: ShortRoleNameService): + OnMemberUpdateABC.__init__(self) + self._service = service + + async def on_member_update(self, before: discord.member.Member, after: discord.member.Member): + if before.roles != after.roles or before.name != after.name: + await self._service.check_short_role_names(after) diff --git a/kdb-bot/src/modules/short_role_name/service/__init__.py b/kdb-bot/src/modules/short_role_name/service/__init__.py new file mode 100644 index 00000000..7304a67b --- /dev/null +++ b/kdb-bot/src/modules/short_role_name/service/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +""" +bot Keksdose bot +~~~~~~~~~~~~~~~~~~~ + +Discord bot for the Keksdose discord Server + +:copyright: (c) 2022 - 2023 sh-edraft.de +:license: MIT, see LICENSE for more details. + +""" + +__title__ = "modules.short_role_name.service" +__author__ = "Sven Heidemann" +__license__ = "MIT" +__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" +__version__ = "1.1.7" + +from collections import namedtuple + + +# imports + +VersionInfo = namedtuple("VersionInfo", "major minor micro") +version_info = VersionInfo(major="1", minor="1", micro="7") diff --git a/kdb-bot/src/modules/short_role_name/service/short_role_name_service.py b/kdb-bot/src/modules/short_role_name/service/short_role_name_service.py new file mode 100644 index 00000000..8fc04b32 --- /dev/null +++ b/kdb-bot/src/modules/short_role_name/service/short_role_name_service.py @@ -0,0 +1,76 @@ +import discord +from cpl_core.configuration import ConfigurationABC +from cpl_core.logging import LoggerABC +from cpl_discord.service import DiscordBotServiceABC +from cpl_query.extension import List + +from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum +from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings +from bot_data.abc.server_repository_abc import ServerRepositoryABC +from bot_data.abc.short_role_name_repository_abc import ShortRoleNameRepositoryABC +from bot_data.model.server_config import ServerConfig +from bot_data.model.short_role_name import ShortRoleName +from bot_data.model.short_role_name_position_enum import ShortRoleNamePositionEnum + + +class ShortRoleNameService: + def __init__( + self, + config: ConfigurationABC, + logger: LoggerABC, + bot: DiscordBotServiceABC, + server: ServerRepositoryABC, + short_role_names: ShortRoleNameRepositoryABC, + ): + self._config = config + self._logger = logger + self._bot = bot + self._server = server + self._short_role_names = short_role_names + + async def check_short_role_names(self, member: discord.Member): + self._logger.debug(__name__, f"Started short role name check for {member.id}") + settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{member.guild.id}") + if not FeatureFlagsSettings.get_flag_from_dict(settings.feature_flags, FeatureFlagsEnum.short_role_name): + self._logger.debug(__name__, f"Feature not active") + return + + if member == member.guild.owner: + return + + before = "" + after = "" + new_nick = member.nick if member.nick is not None else member.name + role_ids = List(discord.Role, member.roles).select(lambda x: x.id) + + server = self._server.get_server_by_discord_id(member.guild.id) + for short_role_name in self._short_role_names.get_short_role_names_by_server_id(server.id): + short_role_name: ShortRoleName = short_role_name + + new_nick = new_nick.replace(f" [{short_role_name.short_name}]", "") + new_nick = new_nick.replace(f"[{short_role_name.short_name}] ", "") + new_nick = new_nick.replace(f"[{short_role_name.short_name}]", "") + + if short_role_name.role_id not in role_ids: + continue + + if short_role_name.position == ShortRoleNamePositionEnum.before: + before += f"[{short_role_name.short_name}] " + elif short_role_name.position == ShortRoleNamePositionEnum.after: + after += f" [{short_role_name.short_name}]" + + if before != "": + new_nick = before + new_nick + + if after != "": + new_nick = new_nick + after + + if member.nick is None or member.nick == new_nick: + return + + try: + self._logger.debug(__name__, f"Update member {member.id}") + await member.edit(nick=new_nick) + self._logger.debug(__name__, f"Updated member {member.id} {member.name}") + except Exception as e: + self._logger.error(__name__, f"Renaming member {member.name} failed", e) diff --git a/kdb-bot/src/modules/short_role_name/short-role-name.json b/kdb-bot/src/modules/short_role_name/short-role-name.json new file mode 100644 index 00000000..3cc5cce9 --- /dev/null +++ b/kdb-bot/src/modules/short_role_name/short-role-name.json @@ -0,0 +1,46 @@ +{ + "ProjectSettings": { + "Name": "short-role-name", + "Version": { + "Major": "0", + "Minor": "0", + "Micro": "0" + }, + "Author": "", + "AuthorEmail": "", + "Description": "", + "LongDescription": "", + "URL": "", + "CopyrightDate": "", + "CopyrightName": "", + "LicenseName": "", + "LicenseDescription": "", + "Dependencies": [ + "cpl-core>=2023.4.0.post5" + ], + "DevDependencies": [ + "cpl-cli>=2023.4.0.post3" + ], + "PythonVersion": ">=3.10.4", + "PythonPath": { + "linux": "" + }, + "Classifiers": [] + }, + "BuildSettings": { + "ProjectType": "library", + "SourcePath": "", + "OutputPath": "../../dist", + "Main": "short_role_name.main", + "EntryPoint": "short-role-name", + "IncludePackageData": false, + "Included": [], + "Excluded": [ + "*/__pycache__", + "*/logs", + "*/tests" + ], + "PackageData": {}, + "ProjectReferences": [] + } +} \ No newline at end of file diff --git a/kdb-bot/src/modules/short_role_name/short_role_name_module.py b/kdb-bot/src/modules/short_role_name/short_role_name_module.py new file mode 100644 index 00000000..dbc41bfc --- /dev/null +++ b/kdb-bot/src/modules/short_role_name/short_role_name_module.py @@ -0,0 +1,28 @@ +from cpl_core.configuration import ConfigurationABC +from cpl_core.dependency_injection import ServiceCollectionABC +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 bot_core.abc.module_abc import ModuleABC +from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum +from bot_data.abc.data_seeder_abc import DataSeederABC +from modules.short_role_name.events.short_role_name_on_member_update_event import ShortRoleNameOnMemberUpdateEvent +from modules.short_role_name.service.short_role_name_service import ShortRoleNameService +from modules.short_role_name.short_role_name_seeder import ShortRoleNameSeeder + + +class ShortRoleNameModule(ModuleABC): + def __init__(self, dc: DiscordCollectionABC): + ModuleABC.__init__(self, dc, FeatureFlagsEnum.short_role_name_module) + + def configure_configuration(self, config: ConfigurationABC, env: ApplicationEnvironmentABC): + pass + + def configure_services(self, services: ServiceCollectionABC, env: ApplicationEnvironmentABC): + services.add_transient(DataSeederABC, ShortRoleNameSeeder) + services.add_transient(ShortRoleNameService) + + # commands + # events + self._dc.add_event(DiscordEventTypesEnum.on_member_update.value, ShortRoleNameOnMemberUpdateEvent) diff --git a/kdb-bot/src/modules/short_role_name/short_role_name_seeder.py b/kdb-bot/src/modules/short_role_name/short_role_name_seeder.py new file mode 100644 index 00000000..2f8f70c0 --- /dev/null +++ b/kdb-bot/src/modules/short_role_name/short_role_name_seeder.py @@ -0,0 +1,21 @@ +from cpl_discord.service import DiscordBotServiceABC + +from bot_data.abc.data_seeder_abc import DataSeederABC +from modules.short_role_name.service.short_role_name_service import ShortRoleNameService + + +class ShortRoleNameSeeder(DataSeederABC): + def __init__( + self, + bot: DiscordBotServiceABC, + short_role_name_service: ShortRoleNameService, + ): + DataSeederABC.__init__(self) + + self._bot = bot + self._short_role_name_service = short_role_name_service + + async def seed(self): + for guild in self._bot.guilds: + for member in guild.members: + await self._short_role_name_service.check_short_role_names(member) diff --git a/kdb-web/src/app/services/sidebar/sidebar.service.ts b/kdb-web/src/app/services/sidebar/sidebar.service.ts index 4b4ace21..1965eb13 100644 --- a/kdb-web/src/app/services/sidebar/sidebar.service.ts +++ b/kdb-web/src/app/services/sidebar/sidebar.service.ts @@ -204,7 +204,7 @@ export class SidebarService { this.serverAutoRoles.visible = this.hasFeature("AutoRoleModule") ? !!user?.isModerator : false; this.serverLevels.visible = this.hasFeature("LevelModule") ? !!user?.isModerator : false; this.serverAchievements.visible = this.hasFeature("AchievementsModule") ? !!user?.isModerator : false; - this.serverShortRoleNames.visible = this.hasFeature("ShortRoleNameModule") ? !!user?.isAdmin : false; + this.serverShortRoleNames.visible = this.hasFeature("ShortRoleName") ? !!user?.isAdmin : false; this.serverConfig.visible = !!user?.isAdmin || isTechnician.length > 0; } else { -- 2.45.2 From 887a46fa7f9a61e67d716f58adc693f6737e19c4 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 17:02:59 +0200 Subject: [PATCH 23/24] Build version #378 --- kdb-bot/src/bot/__init__.py | 4 ++-- kdb-bot/src/bot/bot.json | 4 ++-- kdb-bot/src/bot/extension/__init__.py | 4 ++-- kdb-bot/src/bot_api/__init__.py | 4 ++-- kdb-bot/src/bot_api/abc/__init__.py | 4 ++-- kdb-bot/src/bot_api/configuration/__init__.py | 4 ++-- kdb-bot/src/bot_api/controller/__init__.py | 4 ++-- kdb-bot/src/bot_api/event/__init__.py | 4 ++-- kdb-bot/src/bot_api/exception/__init__.py | 4 ++-- kdb-bot/src/bot_api/filter/__init__.py | 4 ++-- kdb-bot/src/bot_api/filter/discord/__init__.py | 4 ++-- kdb-bot/src/bot_api/logging/__init__.py | 4 ++-- kdb-bot/src/bot_api/model/__init__.py | 4 ++-- kdb-bot/src/bot_api/model/discord/__init__.py | 4 ++-- kdb-bot/src/bot_api/route/__init__.py | 4 ++-- kdb-bot/src/bot_api/service/__init__.py | 4 ++-- kdb-bot/src/bot_api/transformer/__init__.py | 4 ++-- kdb-bot/src/bot_core/__init__.py | 4 ++-- kdb-bot/src/bot_core/abc/__init__.py | 4 ++-- kdb-bot/src/bot_core/configuration/__init__.py | 4 ++-- kdb-bot/src/bot_core/core_extension/__init__.py | 4 ++-- kdb-bot/src/bot_core/events/__init__.py | 4 ++-- kdb-bot/src/bot_core/exception/__init__.py | 4 ++-- kdb-bot/src/bot_core/helper/__init__.py | 4 ++-- kdb-bot/src/bot_core/logging/__init__.py | 4 ++-- kdb-bot/src/bot_core/pipes/__init__.py | 4 ++-- kdb-bot/src/bot_core/service/__init__.py | 4 ++-- kdb-bot/src/bot_data/__init__.py | 4 ++-- kdb-bot/src/bot_data/abc/__init__.py | 4 ++-- kdb-bot/src/bot_data/migration/__init__.py | 4 ++-- kdb-bot/src/bot_data/model/__init__.py | 4 ++-- kdb-bot/src/bot_data/service/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/abc/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/filter/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/model/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/mutations/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/queries/__init__.py | 4 ++-- kdb-bot/src/bot_graphql/queries/discord/__init__.py | 4 ++-- kdb-bot/src/modules/achievements/__init__.py | 4 ++-- kdb-bot/src/modules/achievements/commands/__init__.py | 4 ++-- kdb-bot/src/modules/achievements/events/__init__.py | 4 ++-- kdb-bot/src/modules/achievements/model/__init__.py | 4 ++-- kdb-bot/src/modules/auto_role/__init__.py | 4 ++-- kdb-bot/src/modules/auto_role/command/__init__.py | 4 ++-- kdb-bot/src/modules/auto_role/events/__init__.py | 4 ++-- kdb-bot/src/modules/auto_role/helper/__init__.py | 4 ++-- kdb-bot/src/modules/base/__init__.py | 4 ++-- kdb-bot/src/modules/base/command/__init__.py | 4 ++-- kdb-bot/src/modules/base/events/__init__.py | 4 ++-- kdb-bot/src/modules/base/forms/__init__.py | 4 ++-- kdb-bot/src/modules/base/helper/__init__.py | 4 ++-- kdb-bot/src/modules/base/model/__init__.py | 4 ++-- kdb-bot/src/modules/base/service/__init__.py | 4 ++-- kdb-bot/src/modules/base/thread/__init__.py | 4 ++-- kdb-bot/src/modules/boot_log/__init__.py | 4 ++-- kdb-bot/src/modules/config/__init__.py | 4 ++-- kdb-bot/src/modules/config/events/__init__.py | 4 ++-- kdb-bot/src/modules/config/service/__init__.py | 4 ++-- kdb-bot/src/modules/database/__init__.py | 4 ++-- kdb-bot/src/modules/level/__init__.py | 4 ++-- kdb-bot/src/modules/level/command/__init__.py | 4 ++-- kdb-bot/src/modules/level/configuration/__init__.py | 4 ++-- kdb-bot/src/modules/level/events/__init__.py | 4 ++-- kdb-bot/src/modules/level/service/__init__.py | 4 ++-- kdb-bot/src/modules/permission/__init__.py | 4 ++-- kdb-bot/src/modules/permission/abc/__init__.py | 4 ++-- kdb-bot/src/modules/permission/events/__init__.py | 4 ++-- kdb-bot/src/modules/permission/service/__init__.py | 4 ++-- kdb-bot/src/modules/short_role_name/__init__.py | 4 ++-- kdb-bot/src/modules/short_role_name/events/__init__.py | 4 ++-- kdb-bot/src/modules/short_role_name/service/__init__.py | 4 ++-- kdb-bot/src/modules/technician/__init__.py | 4 ++-- kdb-bot/src/modules/technician/command/__init__.py | 4 ++-- 74 files changed, 148 insertions(+), 148 deletions(-) diff --git a/kdb-bot/src/bot/__init__.py b/kdb-bot/src/bot/__init__.py index ede8577f..46525ecf 100644 --- a/kdb-bot/src/bot/__init__.py +++ b/kdb-bot/src/bot/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index d59036c8..a68042c2 100644 --- a/kdb-bot/src/bot/bot.json +++ b/kdb-bot/src/bot/bot.json @@ -8,8 +8,8 @@ }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", - "Description": "Keksdose bot", - "LongDescription": "Discord bot for the Keksdose discord Server", + "Description": "sh-edraft.de Discord bot", + "LongDescription": "Discord bot for some customers of sh-edraft.de", "URL": "https://www.sh-edraft.de", "CopyrightDate": "2022 - 2023", "CopyrightName": "sh-edraft.de", diff --git a/kdb-bot/src/bot/extension/__init__.py b/kdb-bot/src/bot/extension/__init__.py index c5b5a820..7c51f1fb 100644 --- a/kdb-bot/src/bot/extension/__init__.py +++ b/kdb-bot/src/bot/extension/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/__init__.py b/kdb-bot/src/bot_api/__init__.py index 3feba43b..10b842fe 100644 --- a/kdb-bot/src/bot_api/__init__.py +++ b/kdb-bot/src/bot_api/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/abc/__init__.py b/kdb-bot/src/bot_api/abc/__init__.py index 6295fa76..fb910812 100644 --- a/kdb-bot/src/bot_api/abc/__init__.py +++ b/kdb-bot/src/bot_api/abc/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/configuration/__init__.py b/kdb-bot/src/bot_api/configuration/__init__.py index 1be9b036..00d978a0 100644 --- a/kdb-bot/src/bot_api/configuration/__init__.py +++ b/kdb-bot/src/bot_api/configuration/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/controller/__init__.py b/kdb-bot/src/bot_api/controller/__init__.py index 43d4debe..c7392218 100644 --- a/kdb-bot/src/bot_api/controller/__init__.py +++ b/kdb-bot/src/bot_api/controller/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/event/__init__.py b/kdb-bot/src/bot_api/event/__init__.py index 67d159e0..db832f83 100644 --- a/kdb-bot/src/bot_api/event/__init__.py +++ b/kdb-bot/src/bot_api/event/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/exception/__init__.py b/kdb-bot/src/bot_api/exception/__init__.py index fbd1d1af..7c705ee9 100644 --- a/kdb-bot/src/bot_api/exception/__init__.py +++ b/kdb-bot/src/bot_api/exception/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/filter/__init__.py b/kdb-bot/src/bot_api/filter/__init__.py index 3cd7a70b..c344ffc3 100644 --- a/kdb-bot/src/bot_api/filter/__init__.py +++ b/kdb-bot/src/bot_api/filter/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/filter/discord/__init__.py b/kdb-bot/src/bot_api/filter/discord/__init__.py index ef5043c3..4b60da1b 100644 --- a/kdb-bot/src/bot_api/filter/discord/__init__.py +++ b/kdb-bot/src/bot_api/filter/discord/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/logging/__init__.py b/kdb-bot/src/bot_api/logging/__init__.py index 2b2fb040..ed7e6c9f 100644 --- a/kdb-bot/src/bot_api/logging/__init__.py +++ b/kdb-bot/src/bot_api/logging/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/model/__init__.py b/kdb-bot/src/bot_api/model/__init__.py index 13f14058..b7e61de6 100644 --- a/kdb-bot/src/bot_api/model/__init__.py +++ b/kdb-bot/src/bot_api/model/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/model/discord/__init__.py b/kdb-bot/src/bot_api/model/discord/__init__.py index 2fcf7612..adec5767 100644 --- a/kdb-bot/src/bot_api/model/discord/__init__.py +++ b/kdb-bot/src/bot_api/model/discord/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/route/__init__.py b/kdb-bot/src/bot_api/route/__init__.py index 90cca78c..a6557944 100644 --- a/kdb-bot/src/bot_api/route/__init__.py +++ b/kdb-bot/src/bot_api/route/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/service/__init__.py b/kdb-bot/src/bot_api/service/__init__.py index 14734330..86a7d913 100644 --- a/kdb-bot/src/bot_api/service/__init__.py +++ b/kdb-bot/src/bot_api/service/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/transformer/__init__.py b/kdb-bot/src/bot_api/transformer/__init__.py index ff1a50ca..88db1645 100644 --- a/kdb-bot/src/bot_api/transformer/__init__.py +++ b/kdb-bot/src/bot_api/transformer/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/__init__.py b/kdb-bot/src/bot_core/__init__.py index 37ebae96..e1a22a02 100644 --- a/kdb-bot/src/bot_core/__init__.py +++ b/kdb-bot/src/bot_core/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/abc/__init__.py b/kdb-bot/src/bot_core/abc/__init__.py index 2f031d96..20c6b8eb 100644 --- a/kdb-bot/src/bot_core/abc/__init__.py +++ b/kdb-bot/src/bot_core/abc/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/configuration/__init__.py b/kdb-bot/src/bot_core/configuration/__init__.py index 3e7307ce..26f0b6dd 100644 --- a/kdb-bot/src/bot_core/configuration/__init__.py +++ b/kdb-bot/src/bot_core/configuration/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/core_extension/__init__.py b/kdb-bot/src/bot_core/core_extension/__init__.py index 20e5f3a2..da0083fc 100644 --- a/kdb-bot/src/bot_core/core_extension/__init__.py +++ b/kdb-bot/src/bot_core/core_extension/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/events/__init__.py b/kdb-bot/src/bot_core/events/__init__.py index 1a580490..34578dbf 100644 --- a/kdb-bot/src/bot_core/events/__init__.py +++ b/kdb-bot/src/bot_core/events/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/exception/__init__.py b/kdb-bot/src/bot_core/exception/__init__.py index 147724d2..14444442 100644 --- a/kdb-bot/src/bot_core/exception/__init__.py +++ b/kdb-bot/src/bot_core/exception/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/helper/__init__.py b/kdb-bot/src/bot_core/helper/__init__.py index a25650f3..79ade8d0 100644 --- a/kdb-bot/src/bot_core/helper/__init__.py +++ b/kdb-bot/src/bot_core/helper/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/logging/__init__.py b/kdb-bot/src/bot_core/logging/__init__.py index 63a1d6c1..1d79ede8 100644 --- a/kdb-bot/src/bot_core/logging/__init__.py +++ b/kdb-bot/src/bot_core/logging/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/pipes/__init__.py b/kdb-bot/src/bot_core/pipes/__init__.py index 1407519e..8c10ba04 100644 --- a/kdb-bot/src/bot_core/pipes/__init__.py +++ b/kdb-bot/src/bot_core/pipes/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/service/__init__.py b/kdb-bot/src/bot_core/service/__init__.py index b357547b..16a0c30f 100644 --- a/kdb-bot/src/bot_core/service/__init__.py +++ b/kdb-bot/src/bot_core/service/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/__init__.py b/kdb-bot/src/bot_data/__init__.py index 52de30a7..e6d08eb6 100644 --- a/kdb-bot/src/bot_data/__init__.py +++ b/kdb-bot/src/bot_data/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/abc/__init__.py b/kdb-bot/src/bot_data/abc/__init__.py index 42298b03..b68f5178 100644 --- a/kdb-bot/src/bot_data/abc/__init__.py +++ b/kdb-bot/src/bot_data/abc/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/migration/__init__.py b/kdb-bot/src/bot_data/migration/__init__.py index f1b0d439..bd456500 100644 --- a/kdb-bot/src/bot_data/migration/__init__.py +++ b/kdb-bot/src/bot_data/migration/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/model/__init__.py b/kdb-bot/src/bot_data/model/__init__.py index 1b8062b5..a87713b5 100644 --- a/kdb-bot/src/bot_data/model/__init__.py +++ b/kdb-bot/src/bot_data/model/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/service/__init__.py b/kdb-bot/src/bot_data/service/__init__.py index 9c85ede6..8a358e43 100644 --- a/kdb-bot/src/bot_data/service/__init__.py +++ b/kdb-bot/src/bot_data/service/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/__init__.py b/kdb-bot/src/bot_graphql/__init__.py index b4c05a40..f088e0da 100644 --- a/kdb-bot/src/bot_graphql/__init__.py +++ b/kdb-bot/src/bot_graphql/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/abc/__init__.py b/kdb-bot/src/bot_graphql/abc/__init__.py index 7591d390..43c3c838 100644 --- a/kdb-bot/src/bot_graphql/abc/__init__.py +++ b/kdb-bot/src/bot_graphql/abc/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/filter/__init__.py b/kdb-bot/src/bot_graphql/filter/__init__.py index 03251cd7..5fbb89fb 100644 --- a/kdb-bot/src/bot_graphql/filter/__init__.py +++ b/kdb-bot/src/bot_graphql/filter/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/model/__init__.py b/kdb-bot/src/bot_graphql/model/__init__.py index 352b217d..083899a7 100644 --- a/kdb-bot/src/bot_graphql/model/__init__.py +++ b/kdb-bot/src/bot_graphql/model/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/mutations/__init__.py b/kdb-bot/src/bot_graphql/mutations/__init__.py index 36c9b1d4..8d2265c4 100644 --- a/kdb-bot/src/bot_graphql/mutations/__init__.py +++ b/kdb-bot/src/bot_graphql/mutations/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/queries/__init__.py b/kdb-bot/src/bot_graphql/queries/__init__.py index 562ca85f..0d3a6e65 100644 --- a/kdb-bot/src/bot_graphql/queries/__init__.py +++ b/kdb-bot/src/bot_graphql/queries/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/queries/discord/__init__.py b/kdb-bot/src/bot_graphql/queries/discord/__init__.py index 2b0d1392..9e8f919b 100644 --- a/kdb-bot/src/bot_graphql/queries/discord/__init__.py +++ b/kdb-bot/src/bot_graphql/queries/discord/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/achievements/__init__.py b/kdb-bot/src/modules/achievements/__init__.py index 3ecdbb84..5c16f9ef 100644 --- a/kdb-bot/src/modules/achievements/__init__.py +++ b/kdb-bot/src/modules/achievements/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/achievements/commands/__init__.py b/kdb-bot/src/modules/achievements/commands/__init__.py index c39610da..cdb7f9e6 100644 --- a/kdb-bot/src/modules/achievements/commands/__init__.py +++ b/kdb-bot/src/modules/achievements/commands/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/achievements/events/__init__.py b/kdb-bot/src/modules/achievements/events/__init__.py index f4bc173e..a80f6cb0 100644 --- a/kdb-bot/src/modules/achievements/events/__init__.py +++ b/kdb-bot/src/modules/achievements/events/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/achievements/model/__init__.py b/kdb-bot/src/modules/achievements/model/__init__.py index 06480608..244983ad 100644 --- a/kdb-bot/src/modules/achievements/model/__init__.py +++ b/kdb-bot/src/modules/achievements/model/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/auto_role/__init__.py b/kdb-bot/src/modules/auto_role/__init__.py index 693049f1..1b7c8040 100644 --- a/kdb-bot/src/modules/auto_role/__init__.py +++ b/kdb-bot/src/modules/auto_role/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/auto_role/command/__init__.py b/kdb-bot/src/modules/auto_role/command/__init__.py index edabf80b..4b19f94c 100644 --- a/kdb-bot/src/modules/auto_role/command/__init__.py +++ b/kdb-bot/src/modules/auto_role/command/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/auto_role/events/__init__.py b/kdb-bot/src/modules/auto_role/events/__init__.py index 52b00ed4..aaa09131 100644 --- a/kdb-bot/src/modules/auto_role/events/__init__.py +++ b/kdb-bot/src/modules/auto_role/events/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/auto_role/helper/__init__.py b/kdb-bot/src/modules/auto_role/helper/__init__.py index 2873fa47..3fd2868a 100644 --- a/kdb-bot/src/modules/auto_role/helper/__init__.py +++ b/kdb-bot/src/modules/auto_role/helper/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/__init__.py b/kdb-bot/src/modules/base/__init__.py index 8f4bf190..aa0c3c8b 100644 --- a/kdb-bot/src/modules/base/__init__.py +++ b/kdb-bot/src/modules/base/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/command/__init__.py b/kdb-bot/src/modules/base/command/__init__.py index 72328115..cd47567e 100644 --- a/kdb-bot/src/modules/base/command/__init__.py +++ b/kdb-bot/src/modules/base/command/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/events/__init__.py b/kdb-bot/src/modules/base/events/__init__.py index 47a2dcc7..3ae02c1d 100644 --- a/kdb-bot/src/modules/base/events/__init__.py +++ b/kdb-bot/src/modules/base/events/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/forms/__init__.py b/kdb-bot/src/modules/base/forms/__init__.py index 4a56b8b1..0680bf1a 100644 --- a/kdb-bot/src/modules/base/forms/__init__.py +++ b/kdb-bot/src/modules/base/forms/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/helper/__init__.py b/kdb-bot/src/modules/base/helper/__init__.py index f4396c8f..dab50ae5 100644 --- a/kdb-bot/src/modules/base/helper/__init__.py +++ b/kdb-bot/src/modules/base/helper/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/model/__init__.py b/kdb-bot/src/modules/base/model/__init__.py index b7858460..a41c609f 100644 --- a/kdb-bot/src/modules/base/model/__init__.py +++ b/kdb-bot/src/modules/base/model/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/service/__init__.py b/kdb-bot/src/modules/base/service/__init__.py index be7bcfd1..090a54c4 100644 --- a/kdb-bot/src/modules/base/service/__init__.py +++ b/kdb-bot/src/modules/base/service/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/thread/__init__.py b/kdb-bot/src/modules/base/thread/__init__.py index aab792d8..5c332136 100644 --- a/kdb-bot/src/modules/base/thread/__init__.py +++ b/kdb-bot/src/modules/base/thread/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/boot_log/__init__.py b/kdb-bot/src/modules/boot_log/__init__.py index c92a461a..fa84c469 100644 --- a/kdb-bot/src/modules/boot_log/__init__.py +++ b/kdb-bot/src/modules/boot_log/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/config/__init__.py b/kdb-bot/src/modules/config/__init__.py index c0009ee8..3873b58d 100644 --- a/kdb-bot/src/modules/config/__init__.py +++ b/kdb-bot/src/modules/config/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/config/events/__init__.py b/kdb-bot/src/modules/config/events/__init__.py index 27c8915c..46879ced 100644 --- a/kdb-bot/src/modules/config/events/__init__.py +++ b/kdb-bot/src/modules/config/events/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/config/service/__init__.py b/kdb-bot/src/modules/config/service/__init__.py index 3c07c0c1..7fb0bd88 100644 --- a/kdb-bot/src/modules/config/service/__init__.py +++ b/kdb-bot/src/modules/config/service/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/database/__init__.py b/kdb-bot/src/modules/database/__init__.py index 9003c762..0bb0ff84 100644 --- a/kdb-bot/src/modules/database/__init__.py +++ b/kdb-bot/src/modules/database/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/__init__.py b/kdb-bot/src/modules/level/__init__.py index e063f4cb..d543bb4f 100644 --- a/kdb-bot/src/modules/level/__init__.py +++ b/kdb-bot/src/modules/level/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/command/__init__.py b/kdb-bot/src/modules/level/command/__init__.py index 0803c4c8..f12d3b4d 100644 --- a/kdb-bot/src/modules/level/command/__init__.py +++ b/kdb-bot/src/modules/level/command/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/configuration/__init__.py b/kdb-bot/src/modules/level/configuration/__init__.py index a714411a..0b6f0257 100644 --- a/kdb-bot/src/modules/level/configuration/__init__.py +++ b/kdb-bot/src/modules/level/configuration/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/events/__init__.py b/kdb-bot/src/modules/level/events/__init__.py index 9001db43..e8aafbf4 100644 --- a/kdb-bot/src/modules/level/events/__init__.py +++ b/kdb-bot/src/modules/level/events/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/service/__init__.py b/kdb-bot/src/modules/level/service/__init__.py index 1b4f0b35..9c69e72e 100644 --- a/kdb-bot/src/modules/level/service/__init__.py +++ b/kdb-bot/src/modules/level/service/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/permission/__init__.py b/kdb-bot/src/modules/permission/__init__.py index 8cb0407e..763d4289 100644 --- a/kdb-bot/src/modules/permission/__init__.py +++ b/kdb-bot/src/modules/permission/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/permission/abc/__init__.py b/kdb-bot/src/modules/permission/abc/__init__.py index 3ec12c2f..f260ef48 100644 --- a/kdb-bot/src/modules/permission/abc/__init__.py +++ b/kdb-bot/src/modules/permission/abc/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/permission/events/__init__.py b/kdb-bot/src/modules/permission/events/__init__.py index 57890a9c..7577c0cb 100644 --- a/kdb-bot/src/modules/permission/events/__init__.py +++ b/kdb-bot/src/modules/permission/events/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/permission/service/__init__.py b/kdb-bot/src/modules/permission/service/__init__.py index fd98292f..4867bc4c 100644 --- a/kdb-bot/src/modules/permission/service/__init__.py +++ b/kdb-bot/src/modules/permission/service/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/short_role_name/__init__.py b/kdb-bot/src/modules/short_role_name/__init__.py index 3eccd514..0a296606 100644 --- a/kdb-bot/src/modules/short_role_name/__init__.py +++ b/kdb-bot/src/modules/short_role_name/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/short_role_name/events/__init__.py b/kdb-bot/src/modules/short_role_name/events/__init__.py index b0d72d7b..de3dcc34 100644 --- a/kdb-bot/src/modules/short_role_name/events/__init__.py +++ b/kdb-bot/src/modules/short_role_name/events/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/short_role_name/service/__init__.py b/kdb-bot/src/modules/short_role_name/service/__init__.py index 7304a67b..bc3a6805 100644 --- a/kdb-bot/src/modules/short_role_name/service/__init__.py +++ b/kdb-bot/src/modules/short_role_name/service/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/technician/__init__.py b/kdb-bot/src/modules/technician/__init__.py index 177179d4..aa25aa2e 100644 --- a/kdb-bot/src/modules/technician/__init__.py +++ b/kdb-bot/src/modules/technician/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/technician/command/__init__.py b/kdb-bot/src/modules/technician/command/__init__.py index f175ffff..c78a3cc7 100644 --- a/kdb-bot/src/modules/technician/command/__init__.py +++ b/kdb-bot/src/modules/technician/command/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """ -bot Keksdose bot +bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for the Keksdose discord Server +Discord bot for some customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. -- 2.45.2 From ebc782e266132c98877315a2e89543258a17b5b8 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 28 Sep 2023 17:34:40 +0200 Subject: [PATCH 24/24] Fixed project description #378 --- kdb-bot/src/bot/__init__.py | 2 +- kdb-bot/src/bot/bot.json | 2 +- kdb-bot/src/bot/extension/__init__.py | 2 +- kdb-bot/src/bot_api/__init__.py | 2 +- kdb-bot/src/bot_api/abc/__init__.py | 2 +- kdb-bot/src/bot_api/configuration/__init__.py | 2 +- kdb-bot/src/bot_api/controller/__init__.py | 2 +- kdb-bot/src/bot_api/event/__init__.py | 2 +- kdb-bot/src/bot_api/exception/__init__.py | 2 +- kdb-bot/src/bot_api/filter/__init__.py | 2 +- kdb-bot/src/bot_api/filter/discord/__init__.py | 2 +- kdb-bot/src/bot_api/logging/__init__.py | 2 +- kdb-bot/src/bot_api/model/__init__.py | 2 +- kdb-bot/src/bot_api/model/discord/__init__.py | 2 +- kdb-bot/src/bot_api/route/__init__.py | 2 +- kdb-bot/src/bot_api/service/__init__.py | 2 +- kdb-bot/src/bot_api/transformer/__init__.py | 2 +- kdb-bot/src/bot_core/__init__.py | 2 +- kdb-bot/src/bot_core/abc/__init__.py | 2 +- kdb-bot/src/bot_core/configuration/__init__.py | 2 +- kdb-bot/src/bot_core/core_extension/__init__.py | 2 +- kdb-bot/src/bot_core/events/__init__.py | 2 +- kdb-bot/src/bot_core/exception/__init__.py | 2 +- kdb-bot/src/bot_core/helper/__init__.py | 2 +- kdb-bot/src/bot_core/logging/__init__.py | 2 +- kdb-bot/src/bot_core/pipes/__init__.py | 2 +- kdb-bot/src/bot_core/service/__init__.py | 2 +- kdb-bot/src/bot_data/__init__.py | 2 +- kdb-bot/src/bot_data/abc/__init__.py | 2 +- kdb-bot/src/bot_data/migration/__init__.py | 2 +- kdb-bot/src/bot_data/model/__init__.py | 2 +- kdb-bot/src/bot_data/service/__init__.py | 2 +- kdb-bot/src/bot_graphql/__init__.py | 2 +- kdb-bot/src/bot_graphql/abc/__init__.py | 2 +- kdb-bot/src/bot_graphql/filter/__init__.py | 2 +- kdb-bot/src/bot_graphql/model/__init__.py | 2 +- kdb-bot/src/bot_graphql/mutations/__init__.py | 2 +- kdb-bot/src/bot_graphql/queries/__init__.py | 2 +- kdb-bot/src/bot_graphql/queries/discord/__init__.py | 2 +- kdb-bot/src/modules/achievements/__init__.py | 2 +- kdb-bot/src/modules/achievements/commands/__init__.py | 2 +- kdb-bot/src/modules/achievements/events/__init__.py | 2 +- kdb-bot/src/modules/achievements/model/__init__.py | 2 +- kdb-bot/src/modules/auto_role/__init__.py | 2 +- kdb-bot/src/modules/auto_role/command/__init__.py | 2 +- kdb-bot/src/modules/auto_role/events/__init__.py | 2 +- kdb-bot/src/modules/auto_role/helper/__init__.py | 2 +- kdb-bot/src/modules/base/__init__.py | 2 +- kdb-bot/src/modules/base/command/__init__.py | 2 +- kdb-bot/src/modules/base/events/__init__.py | 2 +- kdb-bot/src/modules/base/forms/__init__.py | 2 +- kdb-bot/src/modules/base/helper/__init__.py | 2 +- kdb-bot/src/modules/base/model/__init__.py | 2 +- kdb-bot/src/modules/base/service/__init__.py | 2 +- kdb-bot/src/modules/base/thread/__init__.py | 2 +- kdb-bot/src/modules/boot_log/__init__.py | 2 +- kdb-bot/src/modules/config/__init__.py | 2 +- kdb-bot/src/modules/config/events/__init__.py | 2 +- kdb-bot/src/modules/config/service/__init__.py | 2 +- kdb-bot/src/modules/database/__init__.py | 2 +- kdb-bot/src/modules/level/__init__.py | 2 +- kdb-bot/src/modules/level/command/__init__.py | 2 +- kdb-bot/src/modules/level/configuration/__init__.py | 2 +- kdb-bot/src/modules/level/events/__init__.py | 2 +- kdb-bot/src/modules/level/service/__init__.py | 2 +- kdb-bot/src/modules/permission/__init__.py | 2 +- kdb-bot/src/modules/permission/abc/__init__.py | 2 +- kdb-bot/src/modules/permission/events/__init__.py | 2 +- kdb-bot/src/modules/permission/service/__init__.py | 2 +- kdb-bot/src/modules/short_role_name/__init__.py | 2 +- kdb-bot/src/modules/short_role_name/events/__init__.py | 2 +- kdb-bot/src/modules/short_role_name/service/__init__.py | 2 +- kdb-bot/src/modules/technician/__init__.py | 2 +- kdb-bot/src/modules/technician/command/__init__.py | 2 +- 74 files changed, 74 insertions(+), 74 deletions(-) diff --git a/kdb-bot/src/bot/__init__.py b/kdb-bot/src/bot/__init__.py index 46525ecf..a99ba5c7 100644 --- a/kdb-bot/src/bot/__init__.py +++ b/kdb-bot/src/bot/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index a68042c2..c06ecd27 100644 --- a/kdb-bot/src/bot/bot.json +++ b/kdb-bot/src/bot/bot.json @@ -9,7 +9,7 @@ "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", "Description": "sh-edraft.de Discord bot", - "LongDescription": "Discord bot for some customers of sh-edraft.de", + "LongDescription": "Discord bot for customers of sh-edraft.de", "URL": "https://www.sh-edraft.de", "CopyrightDate": "2022 - 2023", "CopyrightName": "sh-edraft.de", diff --git a/kdb-bot/src/bot/extension/__init__.py b/kdb-bot/src/bot/extension/__init__.py index 7c51f1fb..46864b75 100644 --- a/kdb-bot/src/bot/extension/__init__.py +++ b/kdb-bot/src/bot/extension/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/__init__.py b/kdb-bot/src/bot_api/__init__.py index 10b842fe..56046548 100644 --- a/kdb-bot/src/bot_api/__init__.py +++ b/kdb-bot/src/bot_api/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/abc/__init__.py b/kdb-bot/src/bot_api/abc/__init__.py index fb910812..bfee7dce 100644 --- a/kdb-bot/src/bot_api/abc/__init__.py +++ b/kdb-bot/src/bot_api/abc/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/configuration/__init__.py b/kdb-bot/src/bot_api/configuration/__init__.py index 00d978a0..99bce8b2 100644 --- a/kdb-bot/src/bot_api/configuration/__init__.py +++ b/kdb-bot/src/bot_api/configuration/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/controller/__init__.py b/kdb-bot/src/bot_api/controller/__init__.py index c7392218..827e00b7 100644 --- a/kdb-bot/src/bot_api/controller/__init__.py +++ b/kdb-bot/src/bot_api/controller/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/event/__init__.py b/kdb-bot/src/bot_api/event/__init__.py index db832f83..4365338f 100644 --- a/kdb-bot/src/bot_api/event/__init__.py +++ b/kdb-bot/src/bot_api/event/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/exception/__init__.py b/kdb-bot/src/bot_api/exception/__init__.py index 7c705ee9..a35e68e2 100644 --- a/kdb-bot/src/bot_api/exception/__init__.py +++ b/kdb-bot/src/bot_api/exception/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/filter/__init__.py b/kdb-bot/src/bot_api/filter/__init__.py index c344ffc3..e44a848e 100644 --- a/kdb-bot/src/bot_api/filter/__init__.py +++ b/kdb-bot/src/bot_api/filter/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/filter/discord/__init__.py b/kdb-bot/src/bot_api/filter/discord/__init__.py index 4b60da1b..c02e568e 100644 --- a/kdb-bot/src/bot_api/filter/discord/__init__.py +++ b/kdb-bot/src/bot_api/filter/discord/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/logging/__init__.py b/kdb-bot/src/bot_api/logging/__init__.py index ed7e6c9f..d673fa5d 100644 --- a/kdb-bot/src/bot_api/logging/__init__.py +++ b/kdb-bot/src/bot_api/logging/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/model/__init__.py b/kdb-bot/src/bot_api/model/__init__.py index b7e61de6..fe5c4f03 100644 --- a/kdb-bot/src/bot_api/model/__init__.py +++ b/kdb-bot/src/bot_api/model/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/model/discord/__init__.py b/kdb-bot/src/bot_api/model/discord/__init__.py index adec5767..12be903d 100644 --- a/kdb-bot/src/bot_api/model/discord/__init__.py +++ b/kdb-bot/src/bot_api/model/discord/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/route/__init__.py b/kdb-bot/src/bot_api/route/__init__.py index a6557944..31306cd2 100644 --- a/kdb-bot/src/bot_api/route/__init__.py +++ b/kdb-bot/src/bot_api/route/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/service/__init__.py b/kdb-bot/src/bot_api/service/__init__.py index 86a7d913..ad87feeb 100644 --- a/kdb-bot/src/bot_api/service/__init__.py +++ b/kdb-bot/src/bot_api/service/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_api/transformer/__init__.py b/kdb-bot/src/bot_api/transformer/__init__.py index 88db1645..b83b5db0 100644 --- a/kdb-bot/src/bot_api/transformer/__init__.py +++ b/kdb-bot/src/bot_api/transformer/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/__init__.py b/kdb-bot/src/bot_core/__init__.py index e1a22a02..abcd632b 100644 --- a/kdb-bot/src/bot_core/__init__.py +++ b/kdb-bot/src/bot_core/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/abc/__init__.py b/kdb-bot/src/bot_core/abc/__init__.py index 20c6b8eb..c85cb67d 100644 --- a/kdb-bot/src/bot_core/abc/__init__.py +++ b/kdb-bot/src/bot_core/abc/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/configuration/__init__.py b/kdb-bot/src/bot_core/configuration/__init__.py index 26f0b6dd..3667c9d4 100644 --- a/kdb-bot/src/bot_core/configuration/__init__.py +++ b/kdb-bot/src/bot_core/configuration/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/core_extension/__init__.py b/kdb-bot/src/bot_core/core_extension/__init__.py index da0083fc..605441e3 100644 --- a/kdb-bot/src/bot_core/core_extension/__init__.py +++ b/kdb-bot/src/bot_core/core_extension/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/events/__init__.py b/kdb-bot/src/bot_core/events/__init__.py index 34578dbf..cd82e103 100644 --- a/kdb-bot/src/bot_core/events/__init__.py +++ b/kdb-bot/src/bot_core/events/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/exception/__init__.py b/kdb-bot/src/bot_core/exception/__init__.py index 14444442..35dbdd70 100644 --- a/kdb-bot/src/bot_core/exception/__init__.py +++ b/kdb-bot/src/bot_core/exception/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/helper/__init__.py b/kdb-bot/src/bot_core/helper/__init__.py index 79ade8d0..d873396e 100644 --- a/kdb-bot/src/bot_core/helper/__init__.py +++ b/kdb-bot/src/bot_core/helper/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/logging/__init__.py b/kdb-bot/src/bot_core/logging/__init__.py index 1d79ede8..0d73eb7b 100644 --- a/kdb-bot/src/bot_core/logging/__init__.py +++ b/kdb-bot/src/bot_core/logging/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/pipes/__init__.py b/kdb-bot/src/bot_core/pipes/__init__.py index 8c10ba04..969224ec 100644 --- a/kdb-bot/src/bot_core/pipes/__init__.py +++ b/kdb-bot/src/bot_core/pipes/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_core/service/__init__.py b/kdb-bot/src/bot_core/service/__init__.py index 16a0c30f..b46a291f 100644 --- a/kdb-bot/src/bot_core/service/__init__.py +++ b/kdb-bot/src/bot_core/service/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/__init__.py b/kdb-bot/src/bot_data/__init__.py index e6d08eb6..86814b29 100644 --- a/kdb-bot/src/bot_data/__init__.py +++ b/kdb-bot/src/bot_data/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/abc/__init__.py b/kdb-bot/src/bot_data/abc/__init__.py index b68f5178..4bf368a7 100644 --- a/kdb-bot/src/bot_data/abc/__init__.py +++ b/kdb-bot/src/bot_data/abc/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/migration/__init__.py b/kdb-bot/src/bot_data/migration/__init__.py index bd456500..b55705ac 100644 --- a/kdb-bot/src/bot_data/migration/__init__.py +++ b/kdb-bot/src/bot_data/migration/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/model/__init__.py b/kdb-bot/src/bot_data/model/__init__.py index a87713b5..02049dd1 100644 --- a/kdb-bot/src/bot_data/model/__init__.py +++ b/kdb-bot/src/bot_data/model/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_data/service/__init__.py b/kdb-bot/src/bot_data/service/__init__.py index 8a358e43..8e99b15f 100644 --- a/kdb-bot/src/bot_data/service/__init__.py +++ b/kdb-bot/src/bot_data/service/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/__init__.py b/kdb-bot/src/bot_graphql/__init__.py index f088e0da..7dfdeefb 100644 --- a/kdb-bot/src/bot_graphql/__init__.py +++ b/kdb-bot/src/bot_graphql/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/abc/__init__.py b/kdb-bot/src/bot_graphql/abc/__init__.py index 43c3c838..8461ba8e 100644 --- a/kdb-bot/src/bot_graphql/abc/__init__.py +++ b/kdb-bot/src/bot_graphql/abc/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/filter/__init__.py b/kdb-bot/src/bot_graphql/filter/__init__.py index 5fbb89fb..2578d910 100644 --- a/kdb-bot/src/bot_graphql/filter/__init__.py +++ b/kdb-bot/src/bot_graphql/filter/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/model/__init__.py b/kdb-bot/src/bot_graphql/model/__init__.py index 083899a7..20888266 100644 --- a/kdb-bot/src/bot_graphql/model/__init__.py +++ b/kdb-bot/src/bot_graphql/model/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/mutations/__init__.py b/kdb-bot/src/bot_graphql/mutations/__init__.py index 8d2265c4..a50a0528 100644 --- a/kdb-bot/src/bot_graphql/mutations/__init__.py +++ b/kdb-bot/src/bot_graphql/mutations/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/queries/__init__.py b/kdb-bot/src/bot_graphql/queries/__init__.py index 0d3a6e65..491451b8 100644 --- a/kdb-bot/src/bot_graphql/queries/__init__.py +++ b/kdb-bot/src/bot_graphql/queries/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/bot_graphql/queries/discord/__init__.py b/kdb-bot/src/bot_graphql/queries/discord/__init__.py index 9e8f919b..cd089596 100644 --- a/kdb-bot/src/bot_graphql/queries/discord/__init__.py +++ b/kdb-bot/src/bot_graphql/queries/discord/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/achievements/__init__.py b/kdb-bot/src/modules/achievements/__init__.py index 5c16f9ef..71ad4b83 100644 --- a/kdb-bot/src/modules/achievements/__init__.py +++ b/kdb-bot/src/modules/achievements/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/achievements/commands/__init__.py b/kdb-bot/src/modules/achievements/commands/__init__.py index cdb7f9e6..5b48db75 100644 --- a/kdb-bot/src/modules/achievements/commands/__init__.py +++ b/kdb-bot/src/modules/achievements/commands/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/achievements/events/__init__.py b/kdb-bot/src/modules/achievements/events/__init__.py index a80f6cb0..cec4df26 100644 --- a/kdb-bot/src/modules/achievements/events/__init__.py +++ b/kdb-bot/src/modules/achievements/events/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/achievements/model/__init__.py b/kdb-bot/src/modules/achievements/model/__init__.py index 244983ad..e5b45037 100644 --- a/kdb-bot/src/modules/achievements/model/__init__.py +++ b/kdb-bot/src/modules/achievements/model/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/auto_role/__init__.py b/kdb-bot/src/modules/auto_role/__init__.py index 1b7c8040..e308d4c1 100644 --- a/kdb-bot/src/modules/auto_role/__init__.py +++ b/kdb-bot/src/modules/auto_role/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/auto_role/command/__init__.py b/kdb-bot/src/modules/auto_role/command/__init__.py index 4b19f94c..d885d2c5 100644 --- a/kdb-bot/src/modules/auto_role/command/__init__.py +++ b/kdb-bot/src/modules/auto_role/command/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/auto_role/events/__init__.py b/kdb-bot/src/modules/auto_role/events/__init__.py index aaa09131..1df584f1 100644 --- a/kdb-bot/src/modules/auto_role/events/__init__.py +++ b/kdb-bot/src/modules/auto_role/events/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/auto_role/helper/__init__.py b/kdb-bot/src/modules/auto_role/helper/__init__.py index 3fd2868a..c3c253a4 100644 --- a/kdb-bot/src/modules/auto_role/helper/__init__.py +++ b/kdb-bot/src/modules/auto_role/helper/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/__init__.py b/kdb-bot/src/modules/base/__init__.py index aa0c3c8b..52eba085 100644 --- a/kdb-bot/src/modules/base/__init__.py +++ b/kdb-bot/src/modules/base/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/command/__init__.py b/kdb-bot/src/modules/base/command/__init__.py index cd47567e..4d2bebf1 100644 --- a/kdb-bot/src/modules/base/command/__init__.py +++ b/kdb-bot/src/modules/base/command/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/events/__init__.py b/kdb-bot/src/modules/base/events/__init__.py index 3ae02c1d..77d39d5f 100644 --- a/kdb-bot/src/modules/base/events/__init__.py +++ b/kdb-bot/src/modules/base/events/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/forms/__init__.py b/kdb-bot/src/modules/base/forms/__init__.py index 0680bf1a..72e2c54f 100644 --- a/kdb-bot/src/modules/base/forms/__init__.py +++ b/kdb-bot/src/modules/base/forms/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/helper/__init__.py b/kdb-bot/src/modules/base/helper/__init__.py index dab50ae5..21f0ed8c 100644 --- a/kdb-bot/src/modules/base/helper/__init__.py +++ b/kdb-bot/src/modules/base/helper/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/model/__init__.py b/kdb-bot/src/modules/base/model/__init__.py index a41c609f..b7080c87 100644 --- a/kdb-bot/src/modules/base/model/__init__.py +++ b/kdb-bot/src/modules/base/model/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/service/__init__.py b/kdb-bot/src/modules/base/service/__init__.py index 090a54c4..9771bb2f 100644 --- a/kdb-bot/src/modules/base/service/__init__.py +++ b/kdb-bot/src/modules/base/service/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/base/thread/__init__.py b/kdb-bot/src/modules/base/thread/__init__.py index 5c332136..2a348f48 100644 --- a/kdb-bot/src/modules/base/thread/__init__.py +++ b/kdb-bot/src/modules/base/thread/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/boot_log/__init__.py b/kdb-bot/src/modules/boot_log/__init__.py index fa84c469..29eb5718 100644 --- a/kdb-bot/src/modules/boot_log/__init__.py +++ b/kdb-bot/src/modules/boot_log/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/config/__init__.py b/kdb-bot/src/modules/config/__init__.py index 3873b58d..3176c939 100644 --- a/kdb-bot/src/modules/config/__init__.py +++ b/kdb-bot/src/modules/config/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/config/events/__init__.py b/kdb-bot/src/modules/config/events/__init__.py index 46879ced..115ca61d 100644 --- a/kdb-bot/src/modules/config/events/__init__.py +++ b/kdb-bot/src/modules/config/events/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/config/service/__init__.py b/kdb-bot/src/modules/config/service/__init__.py index 7fb0bd88..e43d609d 100644 --- a/kdb-bot/src/modules/config/service/__init__.py +++ b/kdb-bot/src/modules/config/service/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/database/__init__.py b/kdb-bot/src/modules/database/__init__.py index 0bb0ff84..f36b93f3 100644 --- a/kdb-bot/src/modules/database/__init__.py +++ b/kdb-bot/src/modules/database/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/__init__.py b/kdb-bot/src/modules/level/__init__.py index d543bb4f..0aded4e7 100644 --- a/kdb-bot/src/modules/level/__init__.py +++ b/kdb-bot/src/modules/level/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/command/__init__.py b/kdb-bot/src/modules/level/command/__init__.py index f12d3b4d..154379a7 100644 --- a/kdb-bot/src/modules/level/command/__init__.py +++ b/kdb-bot/src/modules/level/command/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/configuration/__init__.py b/kdb-bot/src/modules/level/configuration/__init__.py index 0b6f0257..b0b95b47 100644 --- a/kdb-bot/src/modules/level/configuration/__init__.py +++ b/kdb-bot/src/modules/level/configuration/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/events/__init__.py b/kdb-bot/src/modules/level/events/__init__.py index e8aafbf4..2f4e44d7 100644 --- a/kdb-bot/src/modules/level/events/__init__.py +++ b/kdb-bot/src/modules/level/events/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/level/service/__init__.py b/kdb-bot/src/modules/level/service/__init__.py index 9c69e72e..d2a1658a 100644 --- a/kdb-bot/src/modules/level/service/__init__.py +++ b/kdb-bot/src/modules/level/service/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/permission/__init__.py b/kdb-bot/src/modules/permission/__init__.py index 763d4289..16cb5fd9 100644 --- a/kdb-bot/src/modules/permission/__init__.py +++ b/kdb-bot/src/modules/permission/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/permission/abc/__init__.py b/kdb-bot/src/modules/permission/abc/__init__.py index f260ef48..96807eb3 100644 --- a/kdb-bot/src/modules/permission/abc/__init__.py +++ b/kdb-bot/src/modules/permission/abc/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/permission/events/__init__.py b/kdb-bot/src/modules/permission/events/__init__.py index 7577c0cb..12c5f310 100644 --- a/kdb-bot/src/modules/permission/events/__init__.py +++ b/kdb-bot/src/modules/permission/events/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/permission/service/__init__.py b/kdb-bot/src/modules/permission/service/__init__.py index 4867bc4c..f64820d9 100644 --- a/kdb-bot/src/modules/permission/service/__init__.py +++ b/kdb-bot/src/modules/permission/service/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/short_role_name/__init__.py b/kdb-bot/src/modules/short_role_name/__init__.py index 0a296606..41e1dfbb 100644 --- a/kdb-bot/src/modules/short_role_name/__init__.py +++ b/kdb-bot/src/modules/short_role_name/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/short_role_name/events/__init__.py b/kdb-bot/src/modules/short_role_name/events/__init__.py index de3dcc34..daa3d4a7 100644 --- a/kdb-bot/src/modules/short_role_name/events/__init__.py +++ b/kdb-bot/src/modules/short_role_name/events/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/short_role_name/service/__init__.py b/kdb-bot/src/modules/short_role_name/service/__init__.py index bc3a6805..8e012943 100644 --- a/kdb-bot/src/modules/short_role_name/service/__init__.py +++ b/kdb-bot/src/modules/short_role_name/service/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/technician/__init__.py b/kdb-bot/src/modules/technician/__init__.py index aa25aa2e..b9b86092 100644 --- a/kdb-bot/src/modules/technician/__init__.py +++ b/kdb-bot/src/modules/technician/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. diff --git a/kdb-bot/src/modules/technician/command/__init__.py b/kdb-bot/src/modules/technician/command/__init__.py index c78a3cc7..153318a6 100644 --- a/kdb-bot/src/modules/technician/command/__init__.py +++ b/kdb-bot/src/modules/technician/command/__init__.py @@ -4,7 +4,7 @@ bot sh-edraft.de Discord bot ~~~~~~~~~~~~~~~~~~~ -Discord bot for some customers of sh-edraft.de +Discord bot for customers of sh-edraft.de :copyright: (c) 2022 - 2023 sh-edraft.de :license: MIT, see LICENSE for more details. -- 2.45.2