From 1ac5d982ed3ac3c2c0aa763afb396a402b2c6b23 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 4 Jan 2023 17:06:46 +0100 Subject: [PATCH] Fixed #152 --- kdb-bot/src/modules/base/command/user_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kdb-bot/src/modules/base/command/user_group.py b/kdb-bot/src/modules/base/command/user_group.py index 041a5566..c7d5b051 100644 --- a/kdb-bot/src/modules/base/command/user_group.py +++ b/kdb-bot/src/modules/base/command/user_group.py @@ -99,7 +99,7 @@ class UserGroup(DiscordCommandABC): ) ontime = self._user_joined_voice_channel.get_user_joined_voice_channels_by_user_id(user.user_id)\ - .where(lambda x: x is not None)\ + .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)) embed.add_field(name=self._t.transform('modules.base.user.atr.id'), value=member.id)