From 2dfa2da9a081255128ec241114ff2a4e0b0261ab Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 4 Mar 2022 18:21:10 -0600 Subject: [PATCH] Fix case where thumbnail does not exist --- commands/music.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/music.py b/commands/music.py index 6d4d397..441a5a1 100644 --- a/commands/music.py +++ b/commands/music.py @@ -223,7 +223,8 @@ async def play(context): embed.title = match["title"] embed.url = match["link"] - embed.set_thumbnail(match["thumbnails"][0]["url"]) + if match["thumbnails"]: + embed.set_thumbnail(match["thumbnails"][0]["url"]) if running(context.guild_id) and await state(context.guild_id): plugin.d.queue[context.guild_id].extend(sources)