Skip to content

GuildPreview

GuildPreview ⇐ Base

Represents the preview for a guild.

Kind: global class
Extends: Base

new GuildPreview(data, client)

ParamTypeDescription
dataObjectThe data for the guild preview
clientClientThe instantiating client

guildPreview.fetch() ⇒ Promise.<GuildPreview>

Fetches the previewed guild

Kind: instance method of GuildPreview

guildPreview.iconURL(options) ⇒ string

Returns the URL of the guild’s icon

Kind: instance method of GuildPreview
Returns: string - The URL of the guild’s icon or null if no icon is available

ParamTypeDescription
optionsObjectOptions for the icon URL
options.dynamicbooleanWhether the icon should be dynamically generated
options.sizenumberThe size of the icon in pixels
options.formatstringThe format of the icon (e.g. “png” or “jpeg”)

guildPreview.splashURL([options]) ⇒ string

Returns the URL for the guild splash image.

Kind: instance method of GuildPreview
Returns: string - The URL for the guild splash image or null if no splash image is available.

ParamTypeDefaultDescription
[options]ObjectOptions for the splash image.
[options.dynamic]booleanfalseWhether to generate a dynamic or static image.
[options.size]numberThe size of the image in pixels.
[options.format]stringThe format of the image (e.g. “webp”, “png”, etc.).

guildPreview.discoverySplashURL([options]) ⇒ string

Returns the URL for the guild discovery splash image.

Kind: instance method of GuildPreview
Returns: string - The URL for the guild discovery splash image or null if no discovery splash image is available.

ParamTypeDefaultDescription
[options]ObjectOptions for the discovery splash image.
[options.dynamic]booleanfalseWhether to generate a dynamic or static image.
[options.size]numberThe size of the image in pixels.
[options.format]stringThe format of the image (e.g. “webp”, “png”, etc.).