.createReactionCollector(options?)
options?: ReactionCollectorOptions → ReactionCollector
Create a ReactionCollector for this message.
message.createReactionCollector();Class
A message in a channel.
Extends Base
Construct a message from API data.
new Message(client: Client, data: APIMessage)ClientAPIMessageAPI message from REST or MESSAGE_CREATE| Name | Type | Description |
|---|---|---|
| attachmentsread-only | Collection<string, APIMessageAttachment> | Attached files (images, videos, etc.). |
| authorread-only | User | The user who sent this message. |
| callread-only | APIMessageCall | null | Call data if this message represents a call event. |
| channelread-only | (TextChannel | DMChannel | GuildChannel) | null | Cached text/DM/guild channel, or null if uncached. |
| channelIdread-only | string | Channel ID where this message was sent. |
| clientread-only | Client | The Client that instantiated this message. |
| content | string | Text content of the message. |
| createdAtread-only | Date | When the message was created. |
| editedAtread-only | Date | null | When the message was last edited, or null if never edited. |
| embedsread-only | APIEmbed[] | Embedded content (rich previews, etc.). |
| flagsread-only | number | Message flags bitfield. |
| guildread-only | Guild | null | Cached guild, or null for DMs / uncached. |
| guildIdread-only | string | null | Guild ID if in a guild channel, null for DMs. |
| idread-only | string | Snowflake ID of this message. |
| mentionEveryoneread-only | boolean | Whether @everyone or @here was mentioned. |
| mentionRolesread-only | string[] | Role IDs mentioned in the message. |
| mentionsread-only | User[] | Users mentioned in the message. |
| messageReferenceread-only | APIMessageReference | null | Reference to a replied-to message, if any. |
| messageSnapshotsread-only | APIMessageSnapshot[] | Message snapshots for forwarded messages. |
| nonceread-only | string | null | Client-side nonce for deduplication. |
| pinned | boolean | Whether the message is pinned. |
| reactionsread-only | APIMessageReaction[] | Reactions on the message. |
| referencedMessageread-only | Message | null | The full referenced (replied-to) message, or null. |
| stickersread-only | APIMessageSticker[] | Stickers sent with the message. |
| ttsread-only | boolean | Whether this is a text-to-speech message. |
| typeread-only | MessageType | Message type (Default, Reply, etc.). |
| webhookIdread-only | string | null | Webhook ID if sent by a webhook. |
options?: ReactionCollectorOptions → ReactionCollector
Create a ReactionCollector for this message.
message.createReactionCollector();→ Promise<void>
Delete this message.
await message.delete();attachmentId: string → Promise<void>
Delete a specific attachment from this message.
await message.deleteAttachment(attachmentId);options: MessageEditOptions → Promise<Message>
Edit this message (requires author or admin permissions).
await message.edit(options);→ Promise<Message>
Fetch the latest version of this message from the API.
await message.fetch();emoji: EmojiInput, options?: { limit?: number; after?: string; } → Promise<User[]>
Fetch users who reacted with a specific emoji.
await message.fetchReactionUsers(emoji);emoji: EmojiInput, options?: { limit?: number; after?: string; } → Promise<{ users: User[]; hasMore: boolean; nextAfter: string | null }>
Fetch reaction users with pagination metadata.
await message.fetchReactionUsersPage(emoji);→ Promise<void>
Pin this message in the channel.
await message.pin();emoji: EmojiInput → Promise<void>
React to this message with an emoji.
await message.react(emoji);→ Promise<void>
Remove all reactions from this message.
await message.removeAllReactions();emoji: EmojiInput, userId?: string → Promise<void>
Remove a reaction (bot's own or a user's if ID is provided).
await message.removeReaction(emoji);emoji: EmojiInput → Promise<void>
Remove all reactions of a specific emoji.
await message.removeReactionEmoji(emoji);options: string | (MessageSendOptions & ReplyOptions), replyOptions?: ReplyOptions → Promise<Message>
Reply to this message.
await message.reply('Pong!');
await message.reply('No ping!', { ping: false });
await message.reply({ content: 'Silent', allowedMentions: AllowedMentions.suppressReplyPing });→ Promise<Channel>
Fetch and resolve the channel this message is in.
await message.resolveChannel();→ Promise<Guild | null>
Fetch and resolve the guild, or null if a DM.
await message.resolveGuild();options: MessagePrepareInput → Promise<Message>
Send a message in this channel without replying.
await message.send(options);channelId: string, options: MessagePrepareInput → Promise<Message>
Send a message to another channel by ID.
await message.sendTo(channelId, options);→ Promise<void>
Unpin this message from the channel.
await message.unpin();