Skip to content

ReactionEmoji ​

classe · Source

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.

Extends: Emoji

Properties ​

reaction ​

reaction: MessageReaction

The message reaction this emoji refers to Source

animated ​

nullable

animated: boolean

Whether or not the emoji is animated Source

name ​

nullable

name: string

The emoji's name Source

id ​

nullable

id: Snowflake

The emoji's id Source

deleted ​

deprecated

deleted: boolean

Whether or not the structure has been deleted Source

identifier ​

readonly

identifier: string

The identifier of this emoji, used for message reactions Source

url ​

readonly · nullable

url: string

The URL to the emoji file if it's a custom emoji Source

createdTimestamp ​

readonly · nullable

createdTimestamp: number

The timestamp the emoji was created at, or null if unicode Source

createdAt ​

readonly · nullable

createdAt: Date

The time the emoji was created at, or null if unicode Source

client ​

readonly

client: Client

The client that instantiated this Source

Methods ​

toString ​

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. Returns: string

js
// Send a custom emoji from a guild:
const emoji = guild.emojis.cache.first();
msg.channel.send(`Hello! ${emoji}`);
js
// 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}`);

Source

Unofficial software. Not affiliated with or supported by Discord.