Update userUtils.py
This commit is contained in:
parent
9bb2c9f493
commit
c59cc7ed8e
|
@ -76,6 +76,7 @@ def getUserStats(userID, gameMode):
|
|||
# Return stats + game rank
|
||||
return stats
|
||||
|
||||
|
||||
def getUserStatsRx(userID, gameMode):
|
||||
"""
|
||||
Get all user stats relative to `gameMode`
|
||||
|
@ -145,6 +146,25 @@ def getUserStatsAp(userID, gameMode):
|
|||
# Return stats + game rank
|
||||
return stats
|
||||
|
||||
|
||||
|
||||
def getMaxCombo(userID, gameMode):
|
||||
"""
|
||||
Get all user stats relative to `gameMode`
|
||||
|
||||
:param userID:
|
||||
:param gameMode: game mode number
|
||||
:return: dictionary with result
|
||||
"""
|
||||
modeForDB = gameModes.getGameModeForDB(gameMode)
|
||||
# Get stats
|
||||
maxcombo = glob.db.fetch("""SELECT max_combo FROM scores WHERE userid = ? AND play_mode = {gm} ORDER BY max_combo DESC LIMIT 1""".format([userID], gm=modeForDB))
|
||||
|
||||
# Return stats + game rank
|
||||
return maxcombo
|
||||
|
||||
|
||||
|
||||
def getIDSafe(_safeUsername):
|
||||
"""
|
||||
Get user ID from a safe username
|
||||
|
|
Loading…
Reference in New Issue
Block a user