.fetchMessage()
→ Promise<Message>
Fetch the message this reaction belongs to (cache first, then REST).
await reaction.fetchMessage();Class
Represents a reaction on a message (gateway event or message aggregate).
Extends Base
new MessageReaction(client: Client, data: GatewayReactionData)ClientGatewayReactionData| Name | Type | Description |
|---|---|---|
| channelread-only | TextBasedChannel | null | Cached text-capable channel, or null if uncached / not text-based. |
| channelIdread-only | string | |
| clientread-only | Client | |
| count | number | Total count when hydrated from a message payload; 1 for gateway add events. |
| emojiread-only | ReactionEmojiPayload | |
| emojiIdentifierread-only | string | Emoji as a string for reaction routes: unicode or name:id (a:name:id when animated). |
| guildread-only | Guild | null | Guild where this reaction was added. Resolved from cache; null for DMs or if not cached. |
| guildIdread-only | string | null | |
| me | boolean | Whether the current user reacted (message payload); false for gateway remove. |
| messageread-only | Message | null | Cached message this reaction belongs to, or null if the message was not cached. |
| messageIdread-only | string |
→ Promise<Message>
Fetch the message this reaction belongs to (cache first, then REST).
await reaction.fetchMessage();message: MessageReactionContext, data: APIMessageReaction → MessageReaction
Build a reaction aggregate from a message's reactions array entry.
MessageReaction.fromMessage(message, data);