From b436daeb357d3eed69aa46a3e0a5bc624956dcbd Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Tue, 21 Dec 2021 18:43:00 +0100 Subject: [PATCH] Rounded ontime --- src/modules/base/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/base/base.py b/src/modules/base/base.py index fc4d79f..35c53eb 100644 --- a/src/modules/base/base.py +++ b/src/modules/base/base.py @@ -157,7 +157,7 @@ class Base(ModuleABC, OnMemberJoinABC, OnMemberRemoveABC, OnMessageABC, OnVoiceS join.leaved_on = datetime.now() # ontime as hours - ontime = (join.leaved_on - join.joined_on).total_seconds()/3600 + ontime = round((join.leaved_on - join.joined_on).total_seconds()/3600, 2) old_xp = user.xp user.xp += round(ontime * server_st.xp_per_ontime_hour)