Rounded ontime
This commit is contained in:
parent
daa031bc57
commit
b436daeb35
@ -157,7 +157,7 @@ class Base(ModuleABC, OnMemberJoinABC, OnMemberRemoveABC, OnMessageABC, OnVoiceS
|
|||||||
join.leaved_on = datetime.now()
|
join.leaved_on = datetime.now()
|
||||||
|
|
||||||
# ontime as hours
|
# 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
|
old_xp = user.xp
|
||||||
user.xp += round(ontime * server_st.xp_per_ontime_hour)
|
user.xp += round(ontime * server_st.xp_per_ontime_hour)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user