Remove user's time, if the previous one is longer than the current one.
This commit is contained in:
parent
03969a18d7
commit
02d99c0fb1
1 changed files with 6 additions and 1 deletions
|
@ -195,7 +195,12 @@ async def stopMapPlay(
|
||||||
print(BestUserTime, BestTime)
|
print(BestUserTime, BestTime)
|
||||||
if BestUserTime is None or playtime < BestUserTime:
|
if BestUserTime is None or playtime < BestUserTime:
|
||||||
print(BestUserTime)
|
print(BestUserTime)
|
||||||
|
|
||||||
|
updateQuery = db.maps_collection.update_one(
|
||||||
|
{"ID": mapID},
|
||||||
|
{"$pull": {"Leaderboard": {"UserID": userData.ID}}
|
||||||
|
}
|
||||||
|
)
|
||||||
updateQuery = db.maps_collection.update_one(
|
updateQuery = db.maps_collection.update_one(
|
||||||
{"ID": mapID},
|
{"ID": mapID},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue