From e04bd1b3a13039a2a07afb8488798252e1056151 Mon Sep 17 00:00:00 2001 From: Dan Hess Date: Fri, 7 Aug 2020 00:07:54 -0500 Subject: [PATCH] Fix error when trying to clear empty image/thumbnail in embeds --- discord/embeds.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/discord/embeds.py b/discord/embeds.py index 7bbe80305..aa1563e44 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -286,7 +286,10 @@ class Embed: """ if url is EmptyEmbed: - del self._image + try: + del self._image + except AttributeError: + pass else: self._image = { 'url': str(url) @@ -325,7 +328,10 @@ class Embed: """ if url is EmptyEmbed: - del self._thumbnail + try: + del self._thumbnail + except AttributeError: + pass else: self._thumbnail = { 'url': str(url)