diff options
| author | Dan Hess <[email protected]> | 2020-08-07 00:07:54 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-07 01:07:54 -0400 |
| commit | e04bd1b3a13039a2a07afb8488798252e1056151 (patch) | |
| tree | f882eb4da2258286854e27734e31b8c0d38abe62 /discord/embeds.py | |
| parent | Terminate connection if a close code couldn't be handled (diff) | |
| download | discord.py-e04bd1b3a13039a2a07afb8488798252e1056151.tar.xz discord.py-e04bd1b3a13039a2a07afb8488798252e1056151.zip | |
Fix error when trying to clear empty image/thumbnail in embeds
Diffstat (limited to 'discord/embeds.py')
| -rw-r--r-- | discord/embeds.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/discord/embeds.py b/discord/embeds.py index 7bbe8030..aa1563e4 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) |