aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikey <[email protected]>2021-05-26 21:45:35 -0700
committerGitHub <[email protected]>2021-05-27 00:45:35 -0400
commitf42e9226966d5d253e70233df0e2add336f6e60e (patch)
tree6d38a47e7413ddeee16d2770b285347cbbe7826c
parent[commands] Remove function call indirection when checking author (diff)
downloaddiscord.py-f42e9226966d5d253e70233df0e2add336f6e60e.tar.xz
discord.py-f42e9226966d5d253e70233df0e2add336f6e60e.zip
Fix bug in Embed.__len__ caused by footer without text
-rw-r--r--discord/embeds.py6
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