Skip to content

Commit

Permalink
Serialize embedvideos properly
Browse files Browse the repository at this point in the history
  • Loading branch information
4Kaylum committed Feb 16, 2024
1 parent 136a601 commit 2ed821b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions novus/models/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def __init__(
self._footer: EmbedFooter | None = None
self._image: EmbedMedia | None = None
self._thumbnail: EmbedMedia | None = None
self._video: EmbedVideo | None = None
self._video: EmbedMedia | None = None
self._provider: EmbedProvider | None = None
self._author: EmbedAuthor | None = None
self._fields: list[EmbedField] = []
Expand Down Expand Up @@ -276,7 +276,7 @@ def _from_data(cls, data: EmbedPayload) -> Self:
if "thumbnail" in data:
embed._thumbnail = EmbedMedia._from_data(data["thumbnail"])
if "video" in data:
embed._video = EmbedVideo(**data["video"])
embed._video = EmbedMedia._from_data(data["video"])
if "provider" in data:
embed._provider = EmbedProvider(**data["provider"])
if "author" in data:
Expand Down Expand Up @@ -417,7 +417,7 @@ def remove_thumbnail(self) -> Self:
return self

@property
def video(self) -> EmbedVideo | None:
def video(self) -> EmbedMedia | None:
return self._video

@property
Expand Down

0 comments on commit 2ed821b

Please sign in to comment.