From c83efe753c5ef82eb34ed326632915e58a97b2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Mon, 18 Feb 2019 09:41:56 +0100 Subject: [PATCH] Handle missing cheese images --- clients/discord.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/discord.py b/clients/discord.py index 7000785..4259aea 100644 --- a/clients/discord.py +++ b/clients/discord.py @@ -235,8 +235,9 @@ class DiscordClient(discord.Client): else: embed = discord.Embed(title=result['name'], url=result['url'], description=result['description'], color=0xffd700) - embed.set_thumbnail(url=result['image']) - embed.set_image(url=result['image']) + if result['image']: + embed.set_thumbnail(url=result['image']) + embed.set_image(url=result['image']) for point in result['summary']: try: name, value = point.split(':')