Skip to content

EmbedThumbnail

Represents an embed's thumbnail.


Properties



Url

A string that contains the url to the thumbnail's image.




Width

An optional number that contains the thumbnails's width.

Info

Width is only returned if the embed object was returned by Discord.




Height

An optional number that contains the thumbnails's height.

Info

Height is only returned if the embed object was returned by Discord.




ProxiedUrl

An optional boolean that contains a proxied url of the thumbnail's image.

Info

ProxiedUrl is only returned if the embed object was returned by Discord.




Constructors



new(url)

This method returns a new EmbedThumbnail instance.

Parameters

  • url : string - The thumbnail's url.




_fromObject(embedThumbnailObject)

This method constructs an EmbedThumbnail instance from a thumbnail object. Returns a new EmbedThumbnail instance.

Internal Code warning

This method is not meant to be used outside of Voyager's internal code.

Parameters




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 thumbnail 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.