Class

MessageReaction

Represents a reaction on a message (gateway event or message aggregate).

Extends Base

Constructor

new MessageReaction(client: Client, data: GatewayReactionData)
client
Client
data
GatewayReactionData

Properties

NameTypeDescription
channelread-onlyTextBasedChannel | nullCached text-capable channel, or null if uncached / not text-based.
channelIdread-onlystring
clientread-onlyClient
countnumberTotal count when hydrated from a message payload; 1 for gateway add events.
emojiread-onlyReactionEmojiPayload
emojiIdentifierread-onlystringEmoji as a string for reaction routes: unicode or name:id (a:name:id when animated).
guildread-onlyGuild | nullGuild where this reaction was added. Resolved from cache; null for DMs or if not cached.
guildIdread-onlystring | null
mebooleanWhether the current user reacted (message payload); false for gateway remove.
messageread-onlyMessage | nullCached message this reaction belongs to, or null if the message was not cached.
messageIdread-onlystring

Methods

.fetchMessage()

Promise<Message>

Fetch the message this reaction belongs to (cache first, then REST).

await reaction.fetchMessage();