Browse Source
Fix error when trying to clear empty image/thumbnail in embeds
pull/5214/head
Dan Hess
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
2 deletions
-
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) |
|
|
|