Skip to content

Commit 1bd1100

Browse files
authored
fix: properly parse image from dict for embeds (#1455)
Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com>
1 parent 2118d36 commit 1bd1100

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

interactions/models/discord/embed.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,12 @@ class Embed(DictSerializationMixin):
229229
metadata=no_export_meta,
230230
)
231231

232+
@classmethod
233+
def _process_dict(cls, data: Dict[str, Any]) -> Dict[str, Any]:
234+
if image_data := data.pop("image", None):
235+
data["images"] = [image_data]
236+
return data
237+
232238
@property
233239
def image(self) -> Optional[EmbedAttachment]:
234240
"""

0 commit comments

Comments
 (0)