class ApplicationEmoji
extends
Emojiexport class ApplicationEmoji extends EmojiRepresents a custom emoji.
animated : boolean
Whether the emoji is animated
application : ClientApplication
The application this emoji originates from
author : User
The user who created this emoji
readonlycreatedAt : Date
The time the emoji was created at
readonlycreatedTimestamp : number
The timestamp the emoji was created at
id : Snowflake
The emoji's id
readonlyidentifier : string
The identifier of this emoji, used for message reactions
Inherited from: Emoji
Whether this emoji is managed by an external service. Always false for application emojis
name : string
The emoji's name
Whether this emoji requires colons surrounding it. Always true for application emojis
delete() : Promise<ApplicationEmoji>
Deletes the emoji.
edit(options: ApplicationEmojiEditOptions) : Promise<ApplicationEmoji>
Edits the emoji.
// Edit an emoji
emoji.edit({ name: 'newemoji' })
.then(emoji => console.log(`Edited emoji ${emoji}`))
.catch(console.error); equals(other: ApplicationEmoji | unknown) : boolean
Whether this emoji is the same as another one.
imageURL(options?: EmojiURLOptions) : string
Returns a URL for the emoji.
setName(name: string) : Promise<ApplicationEmoji>
Sets the name of the emoji.
toString() : string
When concatenated with a string, this automatically returns the text required to form a graphical emoji on Discord instead of the Emoji object.
// Send a custom emoji from a guild:
const emoji = guild.emojis.cache.first();
msg.channel.send(`Hello! ${emoji}`);// Send the emoji used in a reaction to the channel the reaction is part of
reaction.message.channel.send(`The emoji used was: ${reaction.emoji}`);Inherited from: Emoji