fix 0 star display, hopefully

This commit is contained in:
RLB 2020-12-26 20:18:01 -05:00
parent 1b8a597af8
commit a334d43c55

View File

@ -488,15 +488,13 @@ def build_star_embed(player_json):
for key in starkeys.keys():
embedstring = ""
starstring = str(player_json[key])
if ".5" in starstring:
starnum = int(starstring[0])
addhalf = True
else:
starnum = int(player_json[key])
addhalf = False
addhalf = ".5" in starstring
embedstring += "" * starnum
if addhalf:
embedstring += ""
elif starnum == 0: # why check addhalf twice, amirite
embedstring += "⚪️"
embed.add_field(name=starkeys[key], value=embedstring, inline=False)
return embed