Skip to content

Image

Implementation of discords Image object as a Luau builder.

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

Properties

The Image instance has no set properties!

Methods

The Image instance has no set methods!

Functions

setUrl

Image . setUrl (

     self: Image
     url: string
     proxyUrl: string?
)  -> ()

Set the image url for this embed.

setHeight

Image . setHeight (

     self: Image
     height: number
)  -> ()

Set the image height for this embed.

setWidth

Image . setWidth (

     self: Image
     width: number
)  -> ()

Set the image width for this embed.

build

Image . build (

     self: Image
)  -> ()

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

new

Image . new (

     resource: {
       url: string,
       proxyUrl: string?,
       height: number?,
       width: number?,
    }
)  -> ()

Responsible for creating a new Image.

local image = Image.new({
url = "https://example.com/image.png",
height = 100,
width = 100
})