fixed bug displaying half-stars

This commit is contained in:
Sakimori 2020-12-20 14:05:31 -05:00
parent f194a60042
commit 0141723e1b

View File

@ -102,8 +102,9 @@ def build_star_embed(player_json):
starkeys = {"batting_stars" : "Batting", "pitching_stars" : "Pitching", "baserunning_stars" : "Baserunning", "defense_stars" : "Defense"} starkeys = {"batting_stars" : "Batting", "pitching_stars" : "Pitching", "baserunning_stars" : "Baserunning", "defense_stars" : "Defense"}
embed = discord.Embed(color=discord.Color.purple(), title=player_json["name"]) embed = discord.Embed(color=discord.Color.purple(), title=player_json["name"])
for key in starkeys.keys(): for key in starkeys.keys():
embedstring = ""
starstring = str(player_json[key]) starstring = str(player_json[key])
if "." in starstring: if ".5" in starstring:
starnum = int(starstring[0]) starnum = int(starstring[0])
addhalf = True addhalf = True
else: else: