Skip to content

Commit

Permalink
docs(Message): Document gateway intent for content (#8364)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Jul 27, 2022
1 parent 80b9738 commit 2130aae
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/discord.js/src/structures/Message.js
Expand Up @@ -81,7 +81,9 @@ class Message extends Base {

if ('content' in data) {
/**
* The content of the message
* The content of the message.
* <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
* in a guild for messages that do not mention the client.</info>
* @type {?string}
*/
this.content = data.content;
Expand Down Expand Up @@ -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.
* <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
* in a guild for messages that do not mention the client.</info>
* @type {Embed[]}
*/
this.embeds = data.embeds.map(e => new Embed(e));
Expand All @@ -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.
* <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
* in a guild for messages that do not mention the client.</info>
* @type {ActionRow[]}
*/
this.components = data.components.map(c => createComponent(c));
Expand All @@ -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.
* <info>This property requires the {@link GatewayIntentBits.MessageContent} privileged intent
* in a guild for messages that do not mention the client.</info>
* @type {Collection<Snowflake, Attachment>}
*/
this.attachments = new Collection();
Expand Down

1 comment on commit 2130aae

@vercel
Copy link

@vercel vercel bot commented on 2130aae Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.