From 2130aae3210a8eaf91c5ccae5463940d49052c7d Mon Sep 17 00:00:00 2001
From: Jiralite <33201955+Jiralite@users.noreply.github.com>
Date: Wed, 27 Jul 2022 11:10:05 +0100
Subject: [PATCH] docs(Message): Document gateway intent for content (#8364)
---
packages/discord.js/src/structures/Message.js | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/packages/discord.js/src/structures/Message.js b/packages/discord.js/src/structures/Message.js
index 4683f2c39..5e4753021 100644
--- a/packages/discord.js/src/structures/Message.js
+++ b/packages/discord.js/src/structures/Message.js
@@ -81,7 +81,9 @@ class Message extends Base {
if ('content' in data) {
/**
- * The content of the message
+ * The content of the message.
+ * This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
+ * in a guild for messages that do not mention the client.
* @type {?string}
*/
this.content = data.content;
@@ -133,7 +135,9 @@ class Message extends Base {
if ('embeds' in data) {
/**
- * A list of embeds in the message - e.g. YouTube Player
+ * An array of embeds in the message - e.g. YouTube Player.
+ * This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
+ * in a guild for messages that do not mention the client.
* @type {Embed[]}
*/
this.embeds = data.embeds.map(e => new Embed(e));
@@ -143,7 +147,9 @@ class Message extends Base {
if ('components' in data) {
/**
- * A list of MessageActionRows in the message
+ * An array of of action rows in the message.
+ * This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
+ * in a guild for messages that do not mention the client.
* @type {ActionRow[]}
*/
this.components = data.components.map(c => createComponent(c));
@@ -153,7 +159,9 @@ class Message extends Base {
if ('attachments' in data) {
/**
- * A collection of attachments in the message - e.g. Pictures - mapped by their ids
+ * A collection of attachments in the message - e.g. Pictures - mapped by their ids.
+ * This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
+ * in a guild for messages that do not mention the client.
* @type {Collection}
*/
this.attachments = new Collection();