diff options
| author | Mikey <[email protected]> | 2021-05-26 21:45:35 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-27 00:45:35 -0400 |
| commit | f42e9226966d5d253e70233df0e2add336f6e60e (patch) | |
| tree | 6d38a47e7413ddeee16d2770b285347cbbe7826c | |
| parent | [commands] Remove function call indirection when checking author (diff) | |
| download | discord.py-f42e9226966d5d253e70233df0e2add336f6e60e.tar.xz discord.py-f42e9226966d5d253e70233df0e2add336f6e60e.zip | |
Fix bug in Embed.__len__ caused by footer without text
| -rw-r--r-- | discord/embeds.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/embeds.py b/discord/embeds.py index 3aaaeff3..6e1c1cee 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -273,11 +273,11 @@ class Embed: total += len(field['name']) + len(field['value']) try: - footer = self._footer - except AttributeError: + footer_text = self._footer['text'] + except (AttributeError, KeyError): pass else: - total += len(footer['text']) + total += len(footer_text) try: author = self._author |