Skip to content

Commit 21c6879

Browse files
committed
Reduce embed size
1 parent 748106a commit 21c6879

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
21
# mythical
32
A bot for Arvid

mythical/plugin/faceit.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ async def update_player(self, player: FaceitPlayer, new_level: int, new_elo: int
255255
member_name = f" ({member.name})"
256256

257257
description = []
258-
match_url = None
259258

260259
last_match = get_faceit_last_match(self.key, data["player_id"])
261260
if last_match:
@@ -266,7 +265,7 @@ async def update_player(self, player: FaceitPlayer, new_level: int, new_elo: int
266265
player_statistics = get_player_statistics(last_match_statistics, player.nickname)
267266
result = format_result(last_match_statistics, get_won(last_match, player.nickname))
268267
description.append(
269-
f"{player.nickname} {result} on {match_map}"
268+
f"{player.nickname} [{result} on {match_map}]({match_url})"
270269
f" with a K/D of {player_statistics.kad} ({player_statistics.kd}, {player_statistics.kpr} KPR)"
271270
f" and {player_statistics.hsp}% HS."
272271
)
@@ -289,8 +288,6 @@ async def update_player(self, player: FaceitPlayer, new_level: int, new_elo: int
289288
embed.add_field(name="Previous", value=str(round(player.elo, 1)), inline=True)
290289
embed.add_field(name="Current", value=str(round(new_elo, 1)), inline=True)
291290
embed.add_field(name="Change", value=str(round(new_elo - player.elo, 1)), inline=True)
292-
if match_url is not None:
293-
embed.add_field(name="Match room", value=match_url, inline=False)
294291

295292
await channel.send(embed=embed)
296293

0 commit comments

Comments
 (0)