fix 0 star display, hopefully
This commit is contained in:
parent
1b8a597af8
commit
a334d43c55
|
@ -488,15 +488,13 @@ def build_star_embed(player_json):
|
||||||
for key in starkeys.keys():
|
for key in starkeys.keys():
|
||||||
embedstring = ""
|
embedstring = ""
|
||||||
starstring = str(player_json[key])
|
starstring = str(player_json[key])
|
||||||
if ".5" in starstring:
|
starnum = int(starstring[0])
|
||||||
starnum = int(starstring[0])
|
addhalf = ".5" in starstring
|
||||||
addhalf = True
|
|
||||||
else:
|
|
||||||
starnum = int(player_json[key])
|
|
||||||
addhalf = False
|
|
||||||
embedstring += "⭐" * starnum
|
embedstring += "⭐" * starnum
|
||||||
if addhalf:
|
if addhalf:
|
||||||
embedstring += "✨"
|
embedstring += "✨"
|
||||||
|
elif starnum == 0: # why check addhalf twice, amirite
|
||||||
|
embedstring += "⚪️"
|
||||||
embed.add_field(name=starkeys[key], value=embedstring, inline=False)
|
embed.add_field(name=starkeys[key], value=embedstring, inline=False)
|
||||||
return embed
|
return embed
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user