Hambergo/9kmmrbot

(!np command) Bot showing "Not Picked" instead of position colors when hero isn't picked in a practice lobby

Hambergo opened this issue · 0 comments

Currently, for normal ranked/unranked lobbies, when people don't pick their heroes, it shows the color names of notable players

On private lobbies, the info from the game coordinator isn't ordered by position, therefore the bot calls steam webapi to be able to sort players by their position in the lobby (I believe the sort from the game coordinator is by time the player entered the lobby).
If the steam webapi call doesn't return a value, the players aren't sorted so it says "Not Picked" which is fine (hero_id=0)
but if the api returns a value, the bot still says Not Picked
It's possible to know the type of lobby by the lobby_type property, 1= practice lobby, 7= ranked, etc.

To fix that we can add a boolean sorted attribute to the game after we get info from steam webapi, and then add a check in getHeroName(), or change lobby_type to a different value than 1