diff --git a/cogs/draft.py b/cogs/draft.py index 51111b7..a21c7e7 100644 --- a/cogs/draft.py +++ b/cogs/draft.py @@ -215,7 +215,7 @@ class Draft(commands.Cog): for x in p_query['players']: if count < 5: - core_players_string += f'{x["pos_1"]} {x["name"]} ({x["wara"]})\n' + core_players_string += f'{x["pos_1"]} {x["name"]} ({x["wara"]:.2f})\n' else: break count += 1 diff --git a/cogs/players.py b/cogs/players.py index 39688e4..7e9fd25 100644 --- a/cogs/players.py +++ b/cogs/players.py @@ -2856,7 +2856,7 @@ class Players(commands.Cog): update_string = '' if swar is not None: - update_string += f'sWAR: {this_player["wara"]} => {swar}\n' + update_string += f'sWAR: {this_player["wara"]:.2f} => {swar:.2f}\n' this_player['wara'] = swar if injury_rating is not None: update_string += f'injury_rating: {this_player["injury_rating"]} => {injury_rating}\n' diff --git a/cogs/transactions.py b/cogs/transactions.py index 7879eb2..3291fab 100644 --- a/cogs/transactions.py +++ b/cogs/transactions.py @@ -340,7 +340,7 @@ class SBaTransaction: # Get player string player_string = '' for x in self.players: - player_string += f'**{self.players[x]["player"]["name"]}** ({self.players[x]["player"]["wara"]}) from ' \ + player_string += f'**{self.players[x]["player"]["name"]}** ({self.players[x]["player"]["wara"]:.2f}) from ' \ f'{self.players[x]["player"]["team"]["abbrev"]} to {self.players[x]["to"]["abbrev"]}\n' if len(player_string) == 0: @@ -907,7 +907,7 @@ class Transactions(commands.Cog): if week_num is None: week_num = move['week'] - move_string += f'**{move["player"]["name"]}** ({move["player"]["wara"]}) from ' \ + move_string += f'**{move["player"]["name"]}** ({move["player"]["wara"]:.2f}) from ' \ f'{move["oldteam"]["abbrev"]} to {move["newteam"]["abbrev"]}\n' embed = get_team_embed(f'Week {week_num} Transaction', this_team) @@ -1293,7 +1293,7 @@ class Transactions(commands.Cog): if (exceeds_salary_cap(data['wara'], team_obj) or len(data['roster']) > 26) and not OFFSEASON_FLAG: roster_string = '' for x in data['roster']: - roster_string += f'{x["wara"]: >5} - {x["name"]}\n' + roster_string += f'{x["wara"]: >5.2f} - {x["name"]}\n' roster_errors.append(f'- This is the roster I have for {trade.teams[team]["team"]["abbrev"]}:\n' f'```\n{roster_string}```') @@ -1780,7 +1780,7 @@ class Transactions(commands.Cog): if (exceeds_salary_cap(data['wara'], team_obj) or len(data['roster']) > 26) and not OFFSEASON_FLAG: roster_string = '' for x in data['roster']: - roster_string += f'{x["wara"]: >5} - {x["name"]}\n' + roster_string += f'{x["wara"]: >5.2f} - {x["name"]}\n' errors.append(f'- This is the roster I have for {team_obj["abbrev"]}:\n' f'```\n{roster_string}```') @@ -2081,7 +2081,7 @@ class Transactions(commands.Cog): if (exceeds_salary_cap(data['wara'], team_obj) or len(data['roster']) > 26) and not OFFSEASON_FLAG: roster_string = '' for x in data['roster']: - roster_string += f'{x["wara"]: >5} - {x["name"]}\n' + roster_string += f'{x["wara"]: >5.2f} - {x["name"]}\n' errors.append(f'- This is the roster I have for {team_obj["abbrev"]}:\n' f'```\n{roster_string}```') @@ -2163,7 +2163,7 @@ class Transactions(commands.Cog): guaranteed[x["moveid"]] = [] guaranteed[x["moveid"]].append( - f'**{x["player"]["name"]}** ({x["player"]["wara"]}) from ' + f'**{x["player"]["name"]}** ({x["player"]["wara"]:.2f}) from ' f'{x["oldteam"]["abbrev"]} to {x["newteam"]["abbrev"]}\n' ) @@ -2172,7 +2172,7 @@ class Transactions(commands.Cog): frozen[x["moveid"]] = [] frozen[x["moveid"]].append( - f'**{x["player"]["name"]}** ({x["player"]["wara"]}) from ' + f'**{x["player"]["name"]}** ({x["player"]["wara"]:.2f}) from ' f'{x["oldteam"]["abbrev"]} to {x["newteam"]["abbrev"]}\n' ) @@ -2300,7 +2300,7 @@ class Transactions(commands.Cog): if player['team']['id'] != team['id']: await ctx.send(f'Omg stop trying to make {player["name"]} happen. It\'s not going to happen.') else: - output_string += f'**{player["name"]}** ({player["wara"]}) to MiL\n' + output_string += f'**{player["name"]}** ({player["wara"]:.2f}) to MiL\n' if player['team']['id'] == team['id']: moves.append({ 'week': 1,