Sticker

export class Sticker extends Base
export class Sticker extends Base
Represents a Sticker.

Extends

Base
available:boolean | null
Whether or not the guild sticker is available
Readonly
client:Client<true>
The client that instantiated this
Inherited from Base
Readonly
createdAt:Date
The time the sticker was created at
Readonly
createdTimestamp:number
The timestamp the sticker was created at
description:string | null
The description of the sticker
The format of the sticker
Readonly
guild:Guild | null
The guild that owns this sticker
guildId:Snowflake | null
The id of the guild that owns this sticker
The sticker's id
name:string
The name of the sticker
packId:Snowflake | null
The id of the pack the sticker is from, for standard stickers
Readonly
partial:boolean
Whether this sticker is partial
sortValue:number | null
The standard sticker's sort order within its pack
tags:string | null
Autocomplete/suggestions for the sticker
The type of the sticker
Readonly
url:string
A link to the sticker If the sticker's format is StickerFormatType.Lottie, it returns the URL of the Lottie JSON file.
user:User | null
The user that uploaded the guild sticker
delete(reason?):Promise<Sticker>
Deletes the sticker.
Example
// Delete a message
sticker.delete()
.then(sticker => console.log(`Deleted sticker ${sticker.name}`))
.catch(console.error);
// Delete a message
sticker.delete()
.then(sticker => console.log(`Deleted sticker ${sticker.name}`))
.catch(console.error);
NameTypeOptionalDescription
reasonstringYesReason for deleting this sticker
edit(options?):Promise<Sticker>
Edits the sticker.
Example
// Update the name of a sticker
sticker.edit({ name: 'new name' })
.then(sticker => console.log(`Updated the name of the sticker to ${sticker.name}`))
.catch(console.error);
// Update the name of a sticker
sticker.edit({ name: 'new name' })
.then(sticker => console.log(`Updated the name of the sticker to ${sticker.name}`))
.catch(console.error);
NameTypeOptionalDescription
optionsGuildStickerEditOptionsYesThe options to provide
equals(other):boolean
Whether this sticker is the same as another one.
NameTypeOptionalDescription
otherSticker | unknownNoThe sticker to compare it to
fetch():Promise<Sticker>
Fetches this sticker.
fetchPack():Promise<StickerPack | null>
Fetches the pack that contains this sticker.
Returns
The sticker pack or null if this sticker does not belong to one.
fetchUser():Promise<User | null>
Fetches the user who uploaded this sticker, if this is a guild sticker.
toJSON(...props):unknown
NameTypeOptionalDescription
...propsRecord<string, boolean | string>[]NoNone
Inherited from Base
valueOf():string