Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions interactions/api/models/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1243,12 +1243,34 @@ def set_image(

self.image = EmbedImageStruct(url=url, proxy_url=proxy_url, height=height, width=width)

def set_video(
self,
url: str,
proxy_url: Optional[str] = None,
height: Optional[int] = None,
width: Optional[int] = None,
) -> None:
"""
Sets the embed's video

:param url: Url of the video
:type url: str
:param proxy_url?: A proxied url of the video
:type proxy_url?: Optional[str]
:param height?: The video's height
:type height?: Optional[int]
:param width?: The video's width
:type width?: Optional[int]
"""

self.video = EmbedImageStruct(url=url, proxy_url=proxy_url, height=height, width=width)

def set_thumbnail(
self,
url: str,
proxy_url: Optional[str] = None,
height: int = None,
width: Optional[str] = None,
height: Optional[int] = None,
width: Optional[int] = None,
) -> None:
"""
Sets the embed's thumbnail
Expand Down
1 change: 1 addition & 0 deletions interactions/api/models/message.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,5 @@ class Embed(DictSerializerMixin):
def set_author(self, name: str, url: Optional[str] = None, icon_url: Optional[str] = None, proxy_icon_url: Optional[str] = None) -> None: ...
def set_footer(self, text: str, icon_url: Optional[str] = None, proxy_icon_url: Optional[str] = None) -> None: ...
def set_image(self, url: str, proxy_url: Optional[str] = None, height: Optional[int] = None, width: Optional[int] = None) -> None: ...
def set_video(self, url: str, proxy_url: Optional[str] = None, height: Optional[int] = None, width: Optional[int] = None) -> None: ...
def set_thumbnail(self, url: str, proxy_url: Optional[str] = None, height: Optional[int] = None, width: Optional[int] = None) -> None: ...