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.
readonlyCollection<Key, Holds> cache :
The cache of items for this manager.
Inherited from: DataManager
Guild guild :
The guild this manager belongs to
readonlyConstructable<Holds> holds :
The data structure belonging to this manager.
Inherited from: DataManager
createoptions: 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
deletesticker: StickerResolvablereason?: string) : Promise<void> (
sticker: StickerResolvable
reason?: string
Deletes a sticker.
editsticker: StickerResolvableoptions?: GuildStickerEditOptions) : Promise<Sticker> (
sticker: StickerResolvable
options?: GuildStickerEditOptions
Edits a sticker.
Overload 1
Overload 2
fetchid: 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);
fetchUsersticker: StickerResolvable) : Promise<User | null> (
sticker: StickerResolvable
Fetches the user who uploaded this sticker, if this is a guild sticker.
resolvesticker: StickerResolvable) : Sticker (
sticker: StickerResolvable
Resolves a StickerResolvable to a Sticker object.
resolveIdsticker: StickerResolvable) : Snowflake (
sticker: StickerResolvable
Resolves a StickerResolvable to a Sticker id string.
valueOfCollection<Key, Holds> () :
Inherited from: DataManager