From 76b3a202ea26209b3094471d0b9fb5071674c2db Mon Sep 17 00:00:00 2001 From: BoogeyMan24 Date: Mon, 27 Mar 2023 20:30:15 +0200 Subject: [PATCH 1/5] Fixed MessageReplyOptions --- packages/discord.js/src/structures/Message.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/discord.js/src/structures/Message.js b/packages/discord.js/src/structures/Message.js index f3f13a6fd6d6..d699cfce77fb 100644 --- a/packages/discord.js/src/structures/Message.js +++ b/packages/discord.js/src/structures/Message.js @@ -819,10 +819,9 @@ class Message extends Base { /** * Options provided when sending a message as an inline reply. - * @typedef {BaseMessageCreateOptions} MessageReplyOptions + * @typedef {MessageCreateOptions} MessageReplyOptions * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) - * @property {StickerResolvable[]} [stickers=[]] Stickers to send in the message */ /** From db1e37d2ed587078a63e6284ef2e26f8fc0ecc4f Mon Sep 17 00:00:00 2001 From: BoogeyMan24 Date: Mon, 27 Mar 2023 21:33:06 +0200 Subject: [PATCH 2/5] updated MessageReplyOptions --- packages/discord.js/src/structures/Message.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/discord.js/src/structures/Message.js b/packages/discord.js/src/structures/Message.js index d699cfce77fb..37144f237b02 100644 --- a/packages/discord.js/src/structures/Message.js +++ b/packages/discord.js/src/structures/Message.js @@ -819,9 +819,14 @@ class Message extends Base { /** * Options provided when sending a message as an inline reply. - * @typedef {MessageCreateOptions} MessageReplyOptions + * @typedef {BaseMessageOptions} MessageReplyOptions * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) + * @property {boolean} [tts=false] Whether the message should be spoken aloud + * @property {string} [nonce=''] The nonce for the message + * @property {StickerResolvable[]} [stickers=[]] The stickers to send in the message + * @property {MessageFlags} [flags] Which flags to set for the message. + * Only `MessageFlags.SuppressEmbeds` and `MessageFlags.SuppressNotifications` can be set. */ /** From 939aa15e76e68441d6c63561fb3afb512a2b25f3 Mon Sep 17 00:00:00 2001 From: BoogeyMan24 Date: Mon, 10 Apr 2023 10:37:51 +0200 Subject: [PATCH 3/5] Deduplication - created BaseMessageCreateOptions --- packages/discord.js/src/structures/Message.js | 7 +------ .../src/structures/interfaces/TextBasedChannel.js | 11 ++++++++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/discord.js/src/structures/Message.js b/packages/discord.js/src/structures/Message.js index 37144f237b02..46ea0def9f5b 100644 --- a/packages/discord.js/src/structures/Message.js +++ b/packages/discord.js/src/structures/Message.js @@ -819,14 +819,9 @@ class Message extends Base { /** * Options provided when sending a message as an inline reply. - * @typedef {BaseMessageOptions} MessageReplyOptions + * @typedef {BaseMessageCreateOptions} MessageReplyOptions * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) - * @property {boolean} [tts=false] Whether the message should be spoken aloud - * @property {string} [nonce=''] The nonce for the message - * @property {StickerResolvable[]} [stickers=[]] The stickers to send in the message - * @property {MessageFlags} [flags] Which flags to set for the message. - * Only `MessageFlags.SuppressEmbeds` and `MessageFlags.SuppressNotifications` can be set. */ /** diff --git a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js index 2c73ffc9cb69..ccf7afb086d4 100644 --- a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js +++ b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js @@ -72,18 +72,23 @@ class TextBasedChannel { * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) */ - + /** * The options for sending a message. - * @typedef {BaseMessageOptions} MessageCreateOptions + * @typedef {BaseMessageOptions} BaseMessageCreateOptions * @property {boolean} [tts=false] Whether the message should be spoken aloud * @property {string} [nonce=''] The nonce for the message - * @property {ReplyOptions} [reply] The options for replying to a message * @property {StickerResolvable[]} [stickers=[]] The stickers to send in the message * @property {MessageFlags} [flags] Which flags to set for the message. * Only `MessageFlags.SuppressEmbeds` and `MessageFlags.SuppressNotifications` can be set. */ + /** + * The options for sending a message. + * @typedef {BaseMessageCreateOptions} MessageCreateOptions + * @property {ReplyOptions} [reply] The options for replying to a message + */ + /** * Options provided to control parsing of mentions by Discord * @typedef {Object} MessageMentionOptions From 8ae7478c9ae3afa88cfe5fc29db97469472d39d6 Mon Sep 17 00:00:00 2001 From: BoogeyMan <76151726+BoogeyMan24@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:40:24 +0200 Subject: [PATCH 4/5] Update packages/discord.js/src/structures/interfaces/TextBasedChannel.js Co-authored-by: Jaw0r3k --- .../discord.js/src/structures/interfaces/TextBasedChannel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js index db67c204bc99..a9d84c341275 100644 --- a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js +++ b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js @@ -72,7 +72,6 @@ class TextBasedChannel { * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) */ - /** * The options for sending a message. * @typedef {BaseMessageOptions} BaseMessageCreateOptions From ca3423d59479ad4c326e65a0e527cc8414c2e7fb Mon Sep 17 00:00:00 2001 From: BoogeyMan24 Date: Wed, 12 Apr 2023 18:43:46 +0200 Subject: [PATCH 5/5] Fixed spacing --- .../discord.js/src/structures/interfaces/TextBasedChannel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js index a9d84c341275..d9e1cb24f5d4 100644 --- a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js +++ b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js @@ -72,6 +72,7 @@ class TextBasedChannel { * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) */ + /** * The options for sending a message. * @typedef {BaseMessageOptions} BaseMessageCreateOptions