EmbedImage
Represents an embed's image.
Properties
Url
A string that contains the url of the image.
Width
An optional number that contains the images's width.
Info
Width
is only returned if the embed object was returned by Discord.
Height
An optional number that contains the images's height.
Info
Height
is only returned if the embed object was returned by Discord.
ProxiedUrl
An optional string that contains a proxied url of the image.
Info
ProxiedUrl
is only returned if the embed object was returned by Discord.
Constructors
new(url)
This method returns a new EmbedImage instance.
Parameters
- url : string - The image's url.
_fromObject(embedImageObject)
This method constructs an EmbedImage instance from an image object. Returns a new EmbedImage instance.
Internal Code warning
This method is not meant to be used outside of Voyager's internal code.
Parameters
- embedImageObject : Dictionary - An image object returned by Discord.
Methods
_ToObject()
This method returns a dictionary in this structure.
Internal Code warning
This method is not meant to be used outside of Voyager's internal code.
_Validate()
Validates the image to avoid making a bad request to Discord. This method returns a tuple containing 2 items a boolean and an optional string.
Internal Code warning
This method is not meant to be used outside of Voyager's internal code.
Info
The boolean value indicates whether the validation was successful, and the optional string contains the error message if validation failed.