Closed Toufool closed 1 year ago
@frozenpandaman I made a change, I still need to test it when I'm home though so don't merge yet. Essentially if we're in monitoring mode we can just use LatestBattleHistoriesQuery in prepare_battle_result and theoretically it should be able to find the correct id, match up to the battle["id"] passed in, and send the rank info.
I couldn't find a good way to do this, so I reverted back to the other solution. That specific bankara query has more information in it than latest battles does, and I'm going to guess that x rank and league will be the same. It's unfortunate that the "battle id's" between LatestBattleHistoriesQuery and BankaraBattleHistoriesQuery are different :(
feel free to reject this tho if u dont want to use this solution
Thanks @Toufool! If you call
fetch_json()
withspecific=True
, though, it makes 3 queries (and more when League and X Battles are added) every time it checks for new results which is not ideal – can't we just callLatestBattleHistoriesQuery
? That's just 1 query, and all our recent battles should be within that query. However, that does make sense that sinceBankaraBattleHistoriesQuery
is not getting called, rank info also won't get sent. Can we make it so that if a ranked result is detected then it does that query for more info (namely, getting the rank letter)?