Sticker
classe · Source
Represents a Sticker.
Extends: Base
Properties
id
The sticker's id Source
description
The description of the sticker Source
type
The type of the sticker Source
format
The format of the sticker Source
name
The name of the sticker Source
packId
The id of the pack the sticker is from, for standard stickers Source
tags
An array of tags for the sticker Source
available
Whether or not the guild sticker is available Source
guildId
The id of the guild that owns this sticker Source
user
The user that uploaded the guild sticker Source
sortValue
The standard sticker's sort order within its pack Source
createdTimestamp
The timestamp the sticker was created at Source
createdAt
The time the sticker was created at Source
deleted
Whether or not the sticker has been deleted Source
partial
Whether this sticker is partial Source
guild
The guild that owns this sticker Source
url
A link to the sticker If the sticker's format is LOTTIE, it returns the URL of the Lottie JSON file. Source
client
The client that instantiated this Source
Methods
fetch
Fetches this sticker. Returns: Promise<Sticker>Source
fetchPack
Fetches the pack this sticker is part of from Discord, if this is a Nitro sticker. Returns: Promise<?StickerPack>Source
fetchUser
Fetches the user who uploaded this sticker, if this is a guild sticker. Returns: Promise<?User>Source
edit
Edits the sticker. Parameters
| Name | Type | Description |
|---|---|---|
data? | GuildStickerEditData | The new data for the sticker |
reason? | string | Reason for editing this sticker |
Returns: Promise<Sticker>
// Update the name of a sticker
sticker.edit({ name: 'new name' })
.then(s => console.log(`Updated the name of the sticker to ${s.name}`))
.catch(console.error);delete
Deletes the sticker. Parameters
| Name | Type | Description |
|---|---|---|
reason? | string | Reason for deleting this sticker |
Returns: Promise<Sticker>
// Delete a message
sticker.delete()
.then(s => console.log(`Deleted sticker ${s.name}`))
.catch(console.error);equals
Whether this sticker is the same as another one. Parameters
| Name | Type | Description |
|---|---|---|
other | Sticker | APISticker | The sticker to compare it to |
Returns: booleanSource