Skip to content

Sticker

Sticker ⇐ Base

Represents a Sticker object, extending the Base class.

Kind: global class
Extends: Base

new Sticker([data], guildId, client)

Constructs a Sticker object.

ParamTypeDescription
[data]ObjectThe data object containing the sticker information.
guildIdstringThe ID of the guild the sticker belongs to.
clientClientThe client instance.

sticker.guild ⇒

Retrieves the guild associated with this guildId.

Kind: instance property of Sticker
Returns: The guild object if found, otherwise null.

sticker.fetch(options) ⇒ Promise

Fetches stickers from the guild using the provided options.

Kind: instance method of Sticker
Returns: Promise - - A promise that resolves to the fetched stickers.

ParamTypeDescription
optionsObjectThe options for fetching the stickers.

sticker.edit(options) ⇒ Promise

Edits the sticker with the given options.

Kind: instance method of Sticker
Returns: Promise - A promise that resolves when the sticker is successfully edited.

ParamTypeDescription
optionsObjectThe options to edit the sticker.

sticker.delete(reason) ⇒ Promise.<void>

Deletes the sticker from the guild.

Kind: instance method of Sticker
Returns: Promise.<void> - - A promise that resolves when the sticker is deleted.

ParamTypeDescription
reasonstringThe reason for deleting the sticker.

sticker.setName(name, reason) ⇒ Promise

Sets the name and reason for an object.

Kind: instance method of Sticker
Returns: Promise - - A promise that resolves when the name and reason are successfully set.

ParamTypeDescription
namestringThe new name to set.
reasonstringThe reason for setting the new name.

sticker.setDescription(description, reason) ⇒ Promise

Sets the description of an object and updates it with the provided reason.

Kind: instance method of Sticker
Returns: Promise - - A promise that resolves when the description is successfully updated.

ParamTypeDescription
descriptionstringThe new description to set.
reasonstringThe reason for updating the description.

sticker.setTags(tags, reason) ⇒ Promise

Sets the tags of an object and provides a reason for the change.

Kind: instance method of Sticker
Returns: Promise - - A promise that resolves when the tags are successfully set.

ParamTypeDescription
tagsArrayThe new tags to set.
reasonstringThe reason for the change.

sticker.fetchPack() ⇒ Promise.<(NitroPack|null)>

Fetches the Nitro Pack with the specified packId from the client.

Kind: instance method of Sticker
Returns: Promise.<(NitroPack|null)> - A promise that resolves to the Nitro Pack object if found, or null if not found.

sticker.imageURL(options) ⇒ string

Generates the URL for the sticker image with the specified options.

Kind: instance method of Sticker
Returns: string - The URL of the sticker image.

ParamTypeDescription
optionsObjectThe options for generating the URL.
[options.size]stringThe desired size of the image.
[options.format]stringThe desired format of the image.

sticker.equals(sticker) ⇒ boolean

Checks if the given object is equal to this sticker.

Kind: instance method of Sticker
Returns: boolean - - True if the objects are equal, false otherwise.

ParamTypeDescription
stickerStickerThe object to compare with this sticker.