class ReactionEmoji
extends
Emojiexport class ReactionEmoji extends Emoji
Represents a limited emoji set used for both custom and unicode emojis. Custom emojis will use this class opposed to the Emoji class when the client doesn't know enough information about them.
optionalboolean animated? :
Whether or not the emoji is animated
readonlyClient client :
The client that instantiated this
readonlyoptionalDate createdAt? :
The time the emoji was created at, or null if unicode
readonlyoptionalnumber createdTimestamp? :
The timestamp the emoji was created at, or null if unicode
optionalSnowflake id? :
The emoji's id
readonlystring identifier :
The identifier of this emoji, used for message reactions
optionalstring name? :
The emoji's name
MessageReaction reaction :
The message reaction this emoji refers to
readonlyoptionalstring url? :
Returns a URL for the emoji or null
if this is not a custom emoji.
imageURLoptions?: BaseImageURLOptions) : string | null (
Returns a URL for the emoji or null
if this is not a custom emoji.
Inherited from: Emoji
toJSONunknown () :
toStringstring () :
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