Skip to content

Sticker

classe · Source

Represents a Sticker.

Extends: Base

Properties

id

id: Snowflake

The sticker's id Source

description

nullable

description: string

The description of the sticker Source

type

nullable

type: StickerType

The type of the sticker Source

format

format: StickerFormatType

The format of the sticker Source

name

name: string

The name of the sticker Source

packId

nullable

packId: Snowflake

The id of the pack the sticker is from, for standard stickers Source

tags

nullable

tags: Array<string>

An array of tags for the sticker Source

available

nullable

available: boolean

Whether or not the guild sticker is available Source

guildId

nullable

guildId: Snowflake

The id of the guild that owns this sticker Source

user

nullable

user: User

The user that uploaded the guild sticker Source

sortValue

nullable

sortValue: number

The standard sticker's sort order within its pack Source

createdTimestamp

readonly

createdTimestamp: number

The timestamp the sticker was created at Source

createdAt

readonly

createdAt: Date

The time the sticker was created at Source

deleted

deprecated

deleted: boolean

Whether or not the sticker has been deleted Source

partial

readonly

partial: boolean

Whether this sticker is partial Source

guild

readonly · nullable

guild: Guild

The guild that owns this sticker Source

url

url: string

A link to the sticker If the sticker's format is LOTTIE, it returns the URL of the Lottie JSON file. Source

client

readonly

client: Client

The client that instantiated this Source

Methods

fetch

async

async fetch(): Promise<Sticker>

Fetches this sticker. Returns: Promise<Sticker>Source

fetchPack

async

async fetchPack(): Promise<?StickerPack>

Fetches the pack this sticker is part of from Discord, if this is a Nitro sticker. Returns: Promise<?StickerPack>Source

fetchUser

async

async fetchUser(): Promise<?User>

Fetches the user who uploaded this sticker, if this is a guild sticker. Returns: Promise<?User>Source

edit

edit(data?: GuildStickerEditData, reason?: string): Promise<Sticker>

Edits the sticker. Parameters

NameTypeDescription
data?GuildStickerEditDataThe new data for the sticker
reason?stringReason for editing this sticker

Returns: Promise<Sticker>

js
// 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);

Source

delete

async

async delete(reason?: string): Promise<Sticker>

Deletes the sticker. Parameters

NameTypeDescription
reason?stringReason for deleting this sticker

Returns: Promise<Sticker>

js
// Delete a message
sticker.delete()
  .then(s => console.log(`Deleted sticker ${s.name}`))
  .catch(console.error);

Source

equals

equals(other: Sticker | APISticker): boolean

Whether this sticker is the same as another one. Parameters

NameTypeDescription
otherSticker | APIStickerThe sticker to compare it to

Returns: booleanSource

Unofficial software. Not affiliated with or supported by Discord.