class GuildStickerManager
extends
CachedManager<Snowflake, Sticker, StickerResolvable>export class GuildStickerManager extends CachedManager<Snowflake, Sticker, StickerResolvable>Manages API methods for Guild Stickers and stores their cache.
readonlycache : Collection<Key, Holds>
The cache of items for this manager.
Inherited from: DataManager
guild : Guild
The guild this manager belongs to
readonlyholds : Constructable<Holds>
The data structure belonging to this manager.
Inherited from: DataManager
create(options: GuildStickerCreateOptions) : Promise<Sticker>
options: GuildStickerCreateOptions
Creates a new custom sticker in the guild.
Examples:
// Create a new sticker from a URL
guild.stickers.create({ file: 'https://i.imgur.com/w3duR07.png', name: 'rip', tags: 'headstone' })
.then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
.catch(console.error);// Create a new sticker from a file on your computer
guild.stickers.create({ file: './memes/banana.png', name: 'banana', tags: 'banana' })
.then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
.catch(console.error);Returns: The created sticker
delete(sticker: StickerResolvablereason?: string) : Promise<void>
sticker: StickerResolvable
reason?: string
Deletes a sticker.
edit(sticker: StickerResolvableoptions?: GuildStickerEditOptions) : Promise<Sticker>
sticker: StickerResolvable
options?: GuildStickerEditOptions
Edits a sticker.
Overload 1
Overload 2
fetch(id: Snowflakeoptions?: BaseFetchOptions) : Promise<Sticker>
id: Snowflake
options?: BaseFetchOptions
Obtains one or more stickers from Discord, or the sticker cache if they're already available.
Examples:
// Fetch all stickers from the guild
message.guild.stickers.fetch()
.then(stickers => console.log(`There are ${stickers.size} stickers.`))
.catch(console.error);// Fetch a single sticker
message.guild.stickers.fetch('222078108977594368')
.then(sticker => console.log(`The sticker name is: ${sticker.name}`))
.catch(console.error); fetchUser(sticker: StickerResolvable) : Promise<User | null>
sticker: StickerResolvable
Fetches the user who uploaded this sticker, if this is a guild sticker.
resolve(sticker: StickerResolvable) : Sticker | null
sticker: StickerResolvable
Resolves a StickerResolvable to a Sticker object.
resolveId(sticker: StickerResolvable) : Snowflake | null
sticker: StickerResolvable
Resolves a StickerResolvable to a Sticker id string.
valueOf() : Collection<Key, Holds>
Inherited from: DataManager