Skip to content

Video

Implementation of discords Video object as a Luau builder.

https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure

Video.url  :: string

Source url of video

Video.proxyUrl  :: string?

A proxied url of the video

Video.height  :: number?

Height of video

Video.width  :: number?

Width of video

Video : setUrl ( url proxyUrl )  -> Video

Set the image url for this embed.

Parameters

url: string
proxyUrl: string?

Returns

Video
Video : setHeight ( height )  -> Video

Set the image height for this embed.

Parameters

height: number

Returns

Video
Video : setWidth ( width )  -> Video

Set the image width for this embed.

Parameters

width: number

Returns

Video
Video : build ( )  -> JSON

Responsible for building the Video JSON that can be parsed by the Discord API.

Returns

JSON
Video . new ( resource )  -> Video

Responsible for creating a new Video.

local video = Video.new({
url = "https://example.com/video.mp4",
height = 720,
width = 1280
})

Parameters

resource: {
url: string,
proxyUrl: string?,
height: number?,
width: number?,
}

Returns

Video