From e3aa1996807d53113ec65dad6ea248201460275e Mon Sep 17 00:00:00 2001 From: UP929312 <36114463+UP929312@users.noreply.github.com> Date: Fri, 12 May 2023 21:48:00 +0100 Subject: [PATCH 1/2] FIX embeds having weird state Signed-off-by: UP929312 <36114463+UP929312@users.noreply.github.com> --- discord/embeds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/embeds.py b/discord/embeds.py index 209aac8b38..0dff7b2738 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -350,7 +350,7 @@ def __init__( url: Any | None = None, description: Any | None = None, timestamp: datetime.datetime | None = None, - fields: list[EmbedField] = [], + fields: list[EmbedField]|None = None, author: EmbedAuthor | None = None, footer: EmbedFooter | None = None, image: str | None = None, @@ -374,7 +374,7 @@ def __init__( if timestamp: self.timestamp = timestamp - self._fields: list[EmbedField] = fields + self._fields: list[EmbedField] = fields if fields is not None else [] if author: self.set_author(**author.to_dict()) From b35f0d412f4ecca6b75cde9550ee7898b849d353 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 12 May 2023 20:49:27 +0000 Subject: [PATCH 2/2] style(pre-commit): auto fixes from pre-commit.com hooks --- discord/embeds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/embeds.py b/discord/embeds.py index 0dff7b2738..b7037dd349 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -350,7 +350,7 @@ def __init__( url: Any | None = None, description: Any | None = None, timestamp: datetime.datetime | None = None, - fields: list[EmbedField]|None = None, + fields: list[EmbedField] | None = None, author: EmbedAuthor | None = None, footer: EmbedFooter | None = None, image: str | None = None,