diff --git a/discord/embeds.py b/discord/embeds.py index a877b5c8..51e70cd6 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -405,9 +405,12 @@ class Embed: @image.setter def image(self: E, url: Any): - self._image = { - 'url': str(url), - } + if url is EmptyEmbed: + del self._image + else: + self._image = { + 'url': str(url), + } @image.deleter def image(self: E): @@ -431,10 +434,7 @@ class Embed: The source URL for the image. Only HTTP(S) is supported. """ - if url is EmptyEmbed: - del self.image - else: - self.image = url + self.image = url return self @@ -458,9 +458,12 @@ class Embed: """Sets the thumbnail for the embed content. """ - self._thumbnail = { - 'url': str(url), - } + if url is EmptyEmbed: + del self._thumbnail + else: + self._thumbnail = { + 'url': str(url), + } return @@ -485,10 +488,8 @@ class Embed: url: :class:`str` The source URL for the thumbnail. Only HTTP(S) is supported. """ - if url is EmptyEmbed: - del self.thumbnail - else: - self.thumbnail = url + + self.thumbnail = url return self