class Emoji
extends
Baseexport class Emoji extends BaseRepresents an emoji, see ApplicationEmoji, GuildEmoji and ReactionEmoji.
Constructors
constructor(client: Client<true>emoji: RawEmojiData)
client: Client<true>
emoji: RawEmojiData
Constructs a new instance of the Emoji class
readonlyidentifier : string
The identifier of this emoji, used for message reactions
imageURL(options?: BaseImageURLOptions) : string | null
options?: BaseImageURLOptions
Returns a URL for the emoji or null if this is not a custom emoji.
toJSON() : unknown
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.
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}`);