class ApplicationEmoji
extends
Emojiexport class ApplicationEmoji extends Emoji
Represents a custom emoji.
ClientApplication application :
The application this emoji originates from
The time the emoji was created at, or null if unicode
Inherited from: Emoji
The timestamp the emoji was created at, or null if unicode
Inherited from: Emoji
Snowflake id :
The emoji's id
deletePromise<ApplicationEmoji> () :
Deletes the emoji.
editoptions: ApplicationEmojiEditOptions) : Promise<ApplicationEmoji> (
options: ApplicationEmojiEditOptions
Edits the emoji.
Examples:
// Edit an emoji
emoji.edit({ name: 'newemoji' })
.then(emoji => console.log(`Edited emoji ${emoji}`))
.catch(console.error);
equalsother: ApplicationEmoji | unknown) : boolean (
other: ApplicationEmoji | unknown
Whether this emoji is the same as another one.
imageURLoptions?: BaseImageURLOptions) : string | null (
options?: BaseImageURLOptions
Returns a URL for the emoji or null
if this is not a custom emoji.
Inherited from: Emoji
setNamename: string) : Promise<ApplicationEmoji> (
name: string
Sets the name of the emoji.
toStringstring () :
When concatenated with a string, this automatically returns the text required to form a graphical emoji on Discord instead of the Emoji object.
Examples:
// 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