From c5a618487fa20f599bca8898bec81ef65bf5b334 Mon Sep 17 00:00:00 2001 From: Monbrey Date: Sun, 6 Jun 2021 22:40:00 +1000 Subject: [PATCH 1/2] fix: add components to MessageOption typedefs --- src/structures/Message.js | 1 + src/structures/Webhook.js | 1 + src/structures/interfaces/TextBasedChannel.js | 1 + 3 files changed, 3 insertions(+) diff --git a/src/structures/Message.js b/src/structures/Message.js index 46e066056d99..23b54d07c2d9 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -537,6 +537,7 @@ class Message extends Base { * @property {MessageAttachment[]} [attachments] An array of attachments to keep, * all attachments will be kept if omitted * @property {FileOptions[]|BufferResolvable[]|MessageAttachment[]} [files] Files to add to the message + * @property {MessageActionRow[]} [components] The components for the message */ /** diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 082c1b7cb409..9f4a117e85e2 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -101,6 +101,7 @@ class Webhook { * @property {string} [content] See {@link BaseMessageOptions#content} * @property {FileOptions[]|BufferResolvable[]|MessageAttachment[]} [files] See {@link BaseMessageOptions#files} * @property {MessageMentionOptions} [allowedMentions] See {@link BaseMessageOptions#allowedMentions} + * @property {MessageActionRow[]} [components] The components for the message */ /** diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index 09322b8149d1..7e5d0cbe1394 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -63,6 +63,7 @@ class TextBasedChannel { * @property {string|boolean} [code] Language for optional codeblock formatting to apply * @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if * it exceeds the character limit. If an object is provided, these are the options for splitting the message + * @property {MessageActionRow[]} [components] The components for the message */ /** From c0ea48d2365fddd78e7299789b019eac31dee06f Mon Sep 17 00:00:00 2001 From: Monbrey Date: Sun, 6 Jun 2021 23:05:34 +1000 Subject: [PATCH 2/2] docs: less bland --- src/structures/Message.js | 3 ++- src/structures/Webhook.js | 3 ++- src/structures/interfaces/TextBasedChannel.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 23b54d07c2d9..b4a376cc4ddf 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -537,7 +537,8 @@ class Message extends Base { * @property {MessageAttachment[]} [attachments] An array of attachments to keep, * all attachments will be kept if omitted * @property {FileOptions[]|BufferResolvable[]|MessageAttachment[]} [files] Files to add to the message - * @property {MessageActionRow[]} [components] The components for the message + * @property {MessageActionRow[]} [components] Action rows containing interactive components for the message + * (buttons, select menus) */ /** diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 9f4a117e85e2..1bf929079fde 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -101,7 +101,8 @@ class Webhook { * @property {string} [content] See {@link BaseMessageOptions#content} * @property {FileOptions[]|BufferResolvable[]|MessageAttachment[]} [files] See {@link BaseMessageOptions#files} * @property {MessageMentionOptions} [allowedMentions] See {@link BaseMessageOptions#allowedMentions} - * @property {MessageActionRow[]} [components] The components for the message + * @property {MessageActionRow[]} [components] Action rows containing interactive components for the message + * (buttons, select menus) */ /** diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index 7e5d0cbe1394..8f96723d20f4 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -63,7 +63,8 @@ class TextBasedChannel { * @property {string|boolean} [code] Language for optional codeblock formatting to apply * @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if * it exceeds the character limit. If an object is provided, these are the options for splitting the message - * @property {MessageActionRow[]} [components] The components for the message + * @property {MessageActionRow[]} [components] Action rows containing interactive components for the message + * (buttons, select menus) */ /**