Remove user's time, if the previous one is longer than the current one.

This commit is contained in:
magmaus3 2022-11-20 16:13:38 +01:00
parent 03969a18d7
commit 02d99c0fb1
Signed by: magmaus3
GPG key ID: 966755D3F4A9B251

View file

@ -195,7 +195,12 @@ async def stopMapPlay(
print(BestUserTime, BestTime)
if BestUserTime is None or playtime < BestUserTime:
print(BestUserTime)
updateQuery = db.maps_collection.update_one(
{"ID": mapID},
{"$pull": {"Leaderboard": {"UserID": userData.ID}}
}
)
updateQuery = db.maps_collection.update_one(
{"ID": mapID},
{