From a72fc7416c8f17ee270a0f13ae160a60b9127630 Mon Sep 17 00:00:00 2001 From: Soheab_ <33902984+Soheab@users.noreply.github.com> Date: Thu, 15 Dec 2022 01:11:12 +0100 Subject: [PATCH] Allow empty strings to be in Embed.to_dict --- discord/embeds.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/discord/embeds.py b/discord/embeds.py index 6a79fef71..7c5a13060 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -742,16 +742,16 @@ class Embed: result['timestamp'] = timestamp.replace(tzinfo=datetime.timezone.utc).isoformat() # add in the non raw attribute ones - if self.type: + if self.type is not None: result['type'] = self.type - if self.description: + if self.description is not None: result['description'] = self.description - if self.url: + if self.url is not None: result['url'] = self.url - if self.title: + if self.title is not None: result['title'] = self.title return result # type: ignore # This payload is equivalent to the EmbedData type