Skip to content

Commit e952ffa

Browse files
authored
v3.0.5 (#66)
1 parent 099a6ab commit e952ffa

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/gw2/cogs/sessions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,7 @@ def _add_wvw_stats(embed: discord.Embed, rs_start: dict, rs_end: dict) -> None:
251251
end_val = rs_end[stat_key]
252252
if start_val != end_val:
253253
diff = end_val - start_val
254-
if stat_key == "wvw_rank":
255-
embed.add_field(name=field_name, value=chat_formatting.inline(str(diff)))
256-
else:
257-
embed.add_field(name=field_name, value=chat_formatting.inline(f"+{diff}" if diff > 0 else str(diff)))
254+
embed.add_field(name=field_name, value=chat_formatting.inline(str(diff)))
258255

259256

260257
def _add_wallet_currency_fields(embed: discord.Embed, rs_start: dict, rs_end: dict) -> None:

tests/unit/gw2/cogs/test_sessions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -944,12 +944,11 @@ def test_all_stats_changed(self):
944944
with patch("src.gw2.cogs.sessions.chat_formatting.inline", side_effect=lambda x: f"`{x}`"):
945945
_add_wvw_stats(embed, start, end)
946946
assert len(embed.fields) == 8
947-
# wvw_rank should not have + sign (rank can only increase)
947+
# WvW stats should not have + sign (they can only increase)
948948
rank_field = next(f for f in embed.fields if f.name == gw2_messages.WVW_RANKS)
949949
assert rank_field.value == "`2`"
950-
# other stats should have + sign
951950
yaks_field = next(f for f in embed.fields if f.name == gw2_messages.YAKS_KILLED)
952-
assert yaks_field.value == "`+3`"
951+
assert yaks_field.value == "`3`"
953952

954953
def test_no_stats_changed(self):
955954
embed = discord.Embed()

0 commit comments

Comments
 (0)