Merge pull request 'Fixed user info command (#152)' (#158) from #152 into 0.3

Reviewed-on: sh-edraft.de/kd_discord_bot#158
Reviewed-by: Ebola-Chan <nick.jungmann@gmail.com>
Closes #152
This commit is contained in:
Sven Heidemann 2023-01-04 11:30:00 +01:00
commit 6353c7ca86

View File

@ -96,8 +96,9 @@ class UserGroup(DiscordCommandABC):
color=int('ef9d0d', 16) color=int('ef9d0d', 16)
) )
ontime = self._user_joined_voice_channel.get_user_joined_voice_channels_by_user_id(user.user_id).sum( ontime = self._user_joined_voice_channel.get_user_joined_voice_channels_by_user_id(user.user_id)\
lambda join: round((join.leaved_on - join.joined_on).total_seconds() / 3600, 2)) .where(lambda x: x 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) embed.add_field(name=self._t.transform('modules.base.user.atr.id'), value=member.id)
embed.add_field(name=self._t.transform('modules.base.user.atr.name'), value=member.name) embed.add_field(name=self._t.transform('modules.base.user.atr.name'), value=member.name)