Sticker
Sticker ⇐ Base
Section titled “Sticker ⇐ Base”Represents a Sticker object, extending the Base class.
Kind: global class
Extends: Base
- Sticker ⇐
Base- new Sticker([data], guildId, client)
- .guild ⇒
- .fetch(options) ⇒
Promise - .edit(options) ⇒
Promise - .delete(reason) ⇒
Promise.<void> - .setName(name, reason) ⇒
Promise - .setDescription(description, reason) ⇒
Promise - .setTags(tags, reason) ⇒
Promise - .fetchPack() ⇒
Promise.<(NitroPack|null)> - .imageURL(options) ⇒
string - .equals(sticker) ⇒
boolean
new Sticker([data], guildId, client)
Section titled “new Sticker([data], guildId, client)”Constructs a Sticker object.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The data object containing the sticker information. |
| guildId | string | The ID of the guild the sticker belongs to. |
| client | Client | The client instance. |
sticker.guild ⇒
Section titled “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
Section titled “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.
| Param | Type | Description |
|---|---|---|
| options | Object | The options for fetching the stickers. |
sticker.edit(options) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| options | Object | The options to edit the sticker. |
sticker.delete(reason) ⇒ Promise.<void>
Section titled “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.
| Param | Type | Description |
|---|---|---|
| reason | string | The reason for deleting the sticker. |
sticker.setName(name, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| name | string | The new name to set. |
| reason | string | The reason for setting the new name. |
sticker.setDescription(description, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| description | string | The new description to set. |
| reason | string | The reason for updating the description. |
sticker.setTags(tags, reason) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| tags | Array | The new tags to set. |
| reason | string | The reason for the change. |
sticker.fetchPack() ⇒ Promise.<(NitroPack|null)>
Section titled “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
Section titled “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.
| Param | Type | Description |
|---|---|---|
| options | Object | The options for generating the URL. |
| [options.size] | string | The desired size of the image. |
| [options.format] | string | The desired format of the image. |
sticker.equals(sticker) ⇒ boolean
Section titled “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.
| Param | Type | Description |
|---|---|---|
| sticker | Sticker | The object to compare with this sticker. |