From a78d5f0fcb1c26b142e014fcaa189a6d815e8e80 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 4 Jan 2023 17:19:36 +0100 Subject: [PATCH] Fixed #153 again --- kdb-bot/src/bot/bot.json | 2 +- kdb-bot/src/bot_api/bot-api.json | 2 +- kdb-bot/src/bot_core/bot-core.json | 2 +- kdb-bot/src/bot_data/bot-data.json | 2 +- kdb-bot/src/modules/auto_role/auto-role.json | 2 +- kdb-bot/src/modules/base/base.json | 2 +- kdb-bot/src/modules/base/command/user_group.py | 10 +++++----- kdb-bot/src/modules/boot_log/boot-log.json | 2 +- kdb-bot/src/modules/database/database.json | 2 +- kdb-bot/src/modules/level/level.json | 2 +- kdb-bot/src/modules/permission/permission.json | 2 +- kdb-bot/src/modules/stats/stats.json | 2 +- kdb-bot/src/modules/technician/technician.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 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/kdb-bot/src/bot/bot.json b/kdb-bot/src/bot/bot.json index c3faa82d..c9461eb6 100644 --- a/kdb-bot/src/bot/bot.json +++ b/kdb-bot/src/bot/bot.json @@ -4,7 +4,7 @@ "Version": { "Major": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/bot_api/bot-api.json b/kdb-bot/src/bot_api/bot-api.json index 3a6b7309..9617c023 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": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/bot_core/bot-core.json b/kdb-bot/src/bot_core/bot-core.json index 191526e2..d2c08381 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": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/bot_data/bot-data.json b/kdb-bot/src/bot_data/bot-data.json index d202a48d..7b6959c7 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": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/modules/auto_role/auto-role.json b/kdb-bot/src/modules/auto_role/auto-role.json index aef47bbb..0d1067ba 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": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/base/base.json b/kdb-bot/src/modules/base/base.json index 2e743eaa..0bd9cd71 100644 --- a/kdb-bot/src/modules/base/base.json +++ b/kdb-bot/src/modules/base/base.json @@ -4,7 +4,7 @@ "Version": { "Major": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/base/command/user_group.py b/kdb-bot/src/modules/base/command/user_group.py index c7d5b051..5725e5b6 100644 --- a/kdb-bot/src/modules/base/command/user_group.py +++ b/kdb-bot/src/modules/base/command/user_group.py @@ -158,10 +158,10 @@ class UserGroup(DiscordCommandABC): server = self._servers.find_server_by_discord_id(ctx.guild.id) user = self._users.find_user_by_discord_id_and_server_id(member.id, server.server_id) - if atr == self._atr_dict["xp"]: + if atr == 'xp': value = str(user.xp) - elif atr == self._atr_dict["ontime"]: + elif atr == 'ontime': value = str(round( self._user_joined_voice_channel.get_user_joined_voice_channels_by_user_id(user.user_id) .sum(lambda join: (join.leaved_on - join.joined_on).total_seconds() / 3600), @@ -194,7 +194,7 @@ class UserGroup(DiscordCommandABC): server = self._servers.find_server_by_discord_id(ctx.guild.id) user = self._users.find_user_by_discord_id_and_server_id(member.id, server.server_id) - if atr == self._atr_dict["xp"]: + if atr == 'xp': if not value.isnumeric(): await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform('modules.base.user.set.error.value_type_not_numeric')) return @@ -234,13 +234,13 @@ class UserGroup(DiscordCommandABC): server = self._servers.find_server_by_discord_id(ctx.guild.id) user = self._users.find_user_by_discord_id_and_server_id(member.id, server.server_id) - if atr == self._atr_dict["xp"]: + if atr == 'xp': user.xp = 0 self._users.update_user(user) self._db.save_changes() await self._level.check_level(member) - elif atr == self._atr_dict["ontime"]: + elif atr == 'ontime': self._user_joined_voice_channel.delete_user_joined_voice_channel_by_user_id(user.user_id) self._db.save_changes() diff --git a/kdb-bot/src/modules/boot_log/boot-log.json b/kdb-bot/src/modules/boot_log/boot-log.json index a6425755..c21c82e5 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": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/database/database.json b/kdb-bot/src/modules/database/database.json index b29bc0e7..3c74f040 100644 --- a/kdb-bot/src/modules/database/database.json +++ b/kdb-bot/src/modules/database/database.json @@ -4,7 +4,7 @@ "Version": { "Major": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/modules/level/level.json b/kdb-bot/src/modules/level/level.json index 55ae95ba..d33328bd 100644 --- a/kdb-bot/src/modules/level/level.json +++ b/kdb-bot/src/modules/level/level.json @@ -4,7 +4,7 @@ "Version": { "Major": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/permission/permission.json b/kdb-bot/src/modules/permission/permission.json index cca5193b..8a0ee024 100644 --- a/kdb-bot/src/modules/permission/permission.json +++ b/kdb-bot/src/modules/permission/permission.json @@ -4,7 +4,7 @@ "Version": { "Major": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/stats/stats.json b/kdb-bot/src/modules/stats/stats.json index 27c8379d..b5363ba5 100644 --- a/kdb-bot/src/modules/stats/stats.json +++ b/kdb-bot/src/modules/stats/stats.json @@ -4,7 +4,7 @@ "Version": { "Major": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/technician/technician.json b/kdb-bot/src/modules/technician/technician.json index 8d9ab85c..31de55bd 100644 --- a/kdb-bot/src/modules/technician/technician.json +++ b/kdb-bot/src/modules/technician/technician.json @@ -4,7 +4,7 @@ "Version": { "Major": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/tools/get_version/get-version.json b/kdb-bot/tools/get_version/get-version.json index 801b2ee4..c1287788 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": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "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 a8ec04cb..9b65d736 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": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "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 ef916dd7..1f606987 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": "0", "Minor": "3", - "Micro": "0.rc4" + "Micro": "0.rc5" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de",