From 12dce9b05134787f0606c22fb44f3c2f0d7983f7 Mon Sep 17 00:00:00 2001 From: Naiyar <137700126+imnaiyar@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:12:12 +0530 Subject: [PATCH 1/6] fix(types): remove unusable flags from InteractionDeferReplyOptions --- packages/discord.js/typings/index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index d838dff8a8b4..cdc261de316c 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -6199,10 +6199,7 @@ export interface InteractionCollectorOptions< } export interface InteractionDeferReplyOptions { - flags?: BitFieldResolvable< - Extract, - MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications - >; + flags?: BitFieldResolvable, MessageFlags.Ephemeral>; withResponse?: boolean; } From 6eb2160a460f018998f6a2e3e8de04fe8a1dff29 Mon Sep 17 00:00:00 2001 From: Naiyar <137700126+imnaiyar@users.noreply.github.com> Date: Fri, 10 Jan 2025 20:00:33 +0530 Subject: [PATCH 2/6] fix: include flags in WebhookMessageEditOptions --- packages/discord.js/typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index cdc261de316c..f5d5f0632f75 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -6922,7 +6922,7 @@ export interface WebhookEditOptions { reason?: string; } -export interface WebhookMessageEditOptions extends Omit { +export interface WebhookMessageEditOptions extends MessageEditOptions { threadId?: Snowflake; } From 0b631f873b21045368281a826ef74fc92ada425e Mon Sep 17 00:00:00 2001 From: Naiyar <137700126+imnaiyar@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:09:56 +0600 Subject: [PATCH 3/6] chore: update jsdoc --- packages/discord.js/src/structures/Webhook.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/discord.js/src/structures/Webhook.js b/packages/discord.js/src/structures/Webhook.js index b8302454a7ed..ede2cdff3a33 100644 --- a/packages/discord.js/src/structures/Webhook.js +++ b/packages/discord.js/src/structures/Webhook.js @@ -144,6 +144,7 @@ class Webhook { * @typedef {BaseMessageOptions} WebhookMessageEditOptions * @property {Attachment[]} [attachments] Attachments to send with the message * @property {Snowflake} [threadId] The id of the thread this message belongs to + * @property {MessageFlags} [flags] Which flags to set for the message * For interaction webhooks, this property is ignored */ From 5d5371fe0b6eb71316dbe8384472f299904edc47 Mon Sep 17 00:00:00 2001 From: Naiyar <137700126+imnaiyar@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:14:56 +0600 Subject: [PATCH 4/6] fix: wrong order --- packages/discord.js/src/structures/Webhook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/structures/Webhook.js b/packages/discord.js/src/structures/Webhook.js index ede2cdff3a33..1d1a6c401c80 100644 --- a/packages/discord.js/src/structures/Webhook.js +++ b/packages/discord.js/src/structures/Webhook.js @@ -144,8 +144,8 @@ class Webhook { * @typedef {BaseMessageOptions} WebhookMessageEditOptions * @property {Attachment[]} [attachments] Attachments to send with the message * @property {Snowflake} [threadId] The id of the thread this message belongs to - * @property {MessageFlags} [flags] Which flags to set for the message * For interaction webhooks, this property is ignored + * @property {MessageFlags} [flags] Which flags to set for the message */ /** From ada5c81e974c874f837e0ba92566478f0a2b6a68 Mon Sep 17 00:00:00 2001 From: Naiyar <137700126+imnaiyar@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:16:30 +0600 Subject: [PATCH 5/6] chore: specify the flag --- packages/discord.js/src/structures/Webhook.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/discord.js/src/structures/Webhook.js b/packages/discord.js/src/structures/Webhook.js index 1d1a6c401c80..2765aa1f9169 100644 --- a/packages/discord.js/src/structures/Webhook.js +++ b/packages/discord.js/src/structures/Webhook.js @@ -146,6 +146,7 @@ class Webhook { * @property {Snowflake} [threadId] The id of the thread this message belongs to * For interaction webhooks, this property is ignored * @property {MessageFlags} [flags] Which flags to set for the message + * Only the {@link MessageFlags.SuppressEmbeds} flag can be modified. */ /** From 421c06db05f7eaa58c23bb3ac4cdcdc5f98601f3 Mon Sep 17 00:00:00 2001 From: Naiyar <137700126+imnaiyar@users.noreply.github.com> Date: Mon, 13 Jan 2025 21:56:02 +0530 Subject: [PATCH 6/6] chore: extend MessageEditOptions --- packages/discord.js/src/structures/Webhook.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/discord.js/src/structures/Webhook.js b/packages/discord.js/src/structures/Webhook.js index 2765aa1f9169..e9e6cbcaaf64 100644 --- a/packages/discord.js/src/structures/Webhook.js +++ b/packages/discord.js/src/structures/Webhook.js @@ -141,12 +141,9 @@ class Webhook { /** * Options that can be passed into editMessage. - * @typedef {BaseMessageOptions} WebhookMessageEditOptions - * @property {Attachment[]} [attachments] Attachments to send with the message + * @typedef {MessageEditOptions} WebhookMessageEditOptions * @property {Snowflake} [threadId] The id of the thread this message belongs to * For interaction webhooks, this property is ignored - * @property {MessageFlags} [flags] Which flags to set for the message - * Only the {@link MessageFlags.SuppressEmbeds} flag can be modified. */ /**