forked from MarseyWorld/MarseyWorld
do this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/6807835#context
parent
74dccdf424
commit
4bbf6f8b1a
|
@ -36,16 +36,16 @@ def get_game_leaderboard(game):
|
|||
timestamp_all_time = CASINO_RELEASE_DAY # "All Time" starts on release day
|
||||
|
||||
biggest_win_all_time = g.db.query(CasinoGame.user_id, User.username, CasinoGame.currency, CasinoGame.winnings).select_from(
|
||||
CasinoGame).join(User).order_by(CasinoGame.winnings.desc()).filter(CasinoGame.kind == game, CasinoGame.created_utc > timestamp_all_time).limit(1).one_or_none()
|
||||
CasinoGame).join(User).order_by(CasinoGame.winnings.desc()).filter(CasinoGame.user_id != CARP_ID, CasinoGame.kind == game, CasinoGame.created_utc > timestamp_all_time).limit(1).one_or_none()
|
||||
|
||||
biggest_win_last_24h = g.db.query(CasinoGame.user_id, User.username, CasinoGame.currency, CasinoGame.winnings).select_from(
|
||||
CasinoGame).join(User).order_by(CasinoGame.winnings.desc()).filter(CasinoGame.kind == game, CasinoGame.created_utc > timestamp_24h_ago).limit(1).one_or_none()
|
||||
CasinoGame).join(User).order_by(CasinoGame.winnings.desc()).filter(CasinoGame.user_id != CARP_ID, CasinoGame.kind == game, CasinoGame.created_utc > timestamp_24h_ago).limit(1).one_or_none()
|
||||
|
||||
biggest_loss_all_time = g.db.query(CasinoGame.user_id, User.username, CasinoGame.currency, CasinoGame.winnings).select_from(
|
||||
CasinoGame).join(User).order_by(CasinoGame.winnings).filter(CasinoGame.kind == game, CasinoGame.created_utc > timestamp_all_time).limit(1).one_or_none()
|
||||
CasinoGame).join(User).order_by(CasinoGame.winnings).filter(CasinoGame.user_id != CARP_ID, CasinoGame.kind == game, CasinoGame.created_utc > timestamp_all_time).limit(1).one_or_none()
|
||||
|
||||
biggest_loss_last_24h = g.db.query(CasinoGame.user_id, User.username, CasinoGame.currency, CasinoGame.winnings).select_from(
|
||||
CasinoGame).join(User).order_by(CasinoGame.winnings).filter(CasinoGame.kind == game, CasinoGame.created_utc > timestamp_24h_ago).limit(1).one_or_none()
|
||||
CasinoGame).join(User).order_by(CasinoGame.winnings).filter(CasinoGame.user_id != CARP_ID, CasinoGame.kind == game, CasinoGame.created_utc > timestamp_24h_ago).limit(1).one_or_none()
|
||||
|
||||
if not biggest_win_all_time:
|
||||
biggest_win_all_time = [None, None, None, 0]
|
||||
|
|
Loading…
Reference in New Issue