From 9658a5c2384abf800b9fdd408515176258c114b4 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 14 Jan 2023 00:27:08 +0100 Subject: [PATCH] Fixed ontime round --- kdb-bot/src/bot_api/bot-api.json | 2 +- kdb-bot/src/bot_core/bot-core.json | 2 +- kdb-bot/src/bot_core/service/client_utils_service.py | 5 +++-- 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/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 +- 15 files changed, 17 insertions(+), 16 deletions(-) diff --git a/kdb-bot/src/bot_api/bot-api.json b/kdb-bot/src/bot_api/bot-api.json index 3e92148b..320bb331 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" + "Micro": "1" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/bot_core/bot-core.json b/kdb-bot/src/bot_core/bot-core.json index 1e7a6a1a..fc6849ec 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" + "Micro": "1" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/kdb-bot/src/bot_core/service/client_utils_service.py b/kdb-bot/src/bot_core/service/client_utils_service.py index ebe6cd36..414b62e2 100644 --- a/kdb-bot/src/bot_core/service/client_utils_service.py +++ b/kdb-bot/src/bot_core/service/client_utils_service.py @@ -182,8 +182,9 @@ class ClientUtilsService(ClientUtilsABC): return umcph.xp_count > settings.max_message_xp_per_hour def get_ontime_for_user(self, user: User) -> float: - return ( + return round( self._user_joined_voice_channel.get_user_joined_voice_channels_by_user_id(user.user_id) .where(lambda x: x.leaved_on is not None and x.joined_on is not None) - .sum(lambda join: round((join.leaved_on - join.joined_on).total_seconds() / 3600, 2)) + .sum(lambda join: (join.leaved_on - join.joined_on).total_seconds() / 3600), + 2, ) diff --git a/kdb-bot/src/bot_data/bot-data.json b/kdb-bot/src/bot_data/bot-data.json index e13602ad..4cfedaf6 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" + "Micro": "1" }, "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 2bbe5511..ef61114c 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" + "Micro": "1" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/base/base.json b/kdb-bot/src/modules/base/base.json index c0519d0d..217fb702 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" + "Micro": "1" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/boot_log/boot-log.json b/kdb-bot/src/modules/boot_log/boot-log.json index 589256d7..00610d31 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" + "Micro": "1" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/database/database.json b/kdb-bot/src/modules/database/database.json index ccd2c9c2..bcbe621d 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" + "Micro": "1" }, "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 612f6acc..6a9137dc 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" + "Micro": "1" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/permission/permission.json b/kdb-bot/src/modules/permission/permission.json index 02a65716..15ddb76d 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" + "Micro": "1" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/stats/stats.json b/kdb-bot/src/modules/stats/stats.json index 7fca6677..d063c651 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" + "Micro": "1" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/src/modules/technician/technician.json b/kdb-bot/src/modules/technician/technician.json index 98455a19..4f69b972 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" + "Micro": "1" }, "Author": "", "AuthorEmail": "", diff --git a/kdb-bot/tools/get_version/get-version.json b/kdb-bot/tools/get_version/get-version.json index 05c178d9..5a988b8b 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" + "Micro": "1" }, "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 e00c4c75..9f9f2af7 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" + "Micro": "1" }, "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 f19b5a18..e70fbdbf 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" + "Micro": "1" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de",