From f1bad7430e8c814cda41c89a51f238c7a3b1ee25 Mon Sep 17 00:00:00 2001 From: Nat1anWasTaken Date: Sat, 27 Apr 2024 17:58:55 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(player.py):=20Rep?= =?UTF-8?q?laced=20current=20artwork=20URL=20with=20bot=20user=20avatar=20?= =?UTF-8?q?for=20thumbnail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lava/classes/player.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lava/classes/player.py b/lava/classes/player.py index 7f93a05a..4b00bba9 100644 --- a/lava/classes/player.py +++ b/lava/classes/player.py @@ -286,8 +286,6 @@ def __generate_display_embed(self) -> Embed: inline=True ) - embed.set_thumbnail(url=self.current.artwork_url) - embed.set_footer( text=self.bot.get_text( "display.footer", self.locale, "如果你覺得音樂怪怪的,可以試著檢查看看效果器設定或是切換語音頻道地區" @@ -297,6 +295,9 @@ def __generate_display_embed(self) -> Embed: if self.current.artwork_url: embed.set_image(url=self.current.artwork_url) + if self.bot.user.avatar: + embed.set_thumbnail(self.bot.user.avatar) + else: embed.title = self.bot.get_text("error.nothing_playing", self.locale, "沒有正在播放的音樂")