From ba5b685c600637c6bed7e183b81e86adcdf4d5df Mon Sep 17 00:00:00 2001 From: Snipy7374 <100313469+Snipy7374@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:25:14 +0200 Subject: [PATCH] smol fix --- disnake/message.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/disnake/message.py b/disnake/message.py index fa4cec927e..f93d54ece5 100644 --- a/disnake/message.py +++ b/disnake/message.py @@ -1556,15 +1556,15 @@ def system_content(self) -> Optional[str]: total_votes = poll_embed_fields["total_votes"] winning_answer = poll_embed_fields.get("victor_answer_text") winning_answer_votes = poll_embed_fields.get("victor_answer_votes") - msg = ( - f"{self.author.global_name}'s poll {question} has closed. With {total_votes} votes." - ) + msg = f"{self.author.display_name}'s poll {question} has closed." if winning_answer and winning_answer_votes: msg += ( f" {winning_answer} won with {winning_answer_votes} " f"({(100 * int(winning_answer_votes)) // int(total_votes)}%)." ) + else: + msg += f" With {total_votes} total votes." return msg # in the event of an unknown or unsupported message type, we return nothing