From 83a53dcbb4847f50f9dda833f065b2d8ee7412d3 Mon Sep 17 00:00:00 2001 From: user Date: Tue, 26 Mar 2024 15:50:01 +0300 Subject: [PATCH] In webhook.MessageFormatter.check_limits handle author.name field being None --- avtdl/plugins/discord/webhook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avtdl/plugins/discord/webhook.py b/avtdl/plugins/discord/webhook.py index 2e49618..a328d98 100644 --- a/avtdl/plugins/discord/webhook.py +++ b/avtdl/plugins/discord/webhook.py @@ -174,7 +174,7 @@ class Limits: total_length = 0 embeds = message.get('embeds', []) for embed in embeds: - author_name = len(embed.get('author', {}).get('name', '')) + author_name = len(embed.get('author', {}).get('name', '') or '') title = len(embed.get('title') or '') description = len(embed.get('description') or '') footer_text = len((embed.get('footer') or {}).get('text') or '')