Skip to content

Commit 68dd260

Browse files
imnaiyarJiralite
andcommittedJan 18, 2025··
types: Allow only ephemeral for defer reply (#10696)
* fix(types): remove unusable flags from InteractionDeferReplyOptions * fix: include flags in WebhookMessageEditOptions * chore: update jsdoc * fix: wrong order * chore: specify the flag * chore: extend MessageEditOptions --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
1 parent 5e66f85 commit 68dd260

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed
 

‎packages/discord.js/src/structures/Webhook.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ class Webhook {
141141

142142
/**
143143
* Options that can be passed into editMessage.
144-
* @typedef {BaseMessageOptions} WebhookMessageEditOptions
145-
* @property {Attachment[]} [attachments] Attachments to send with the message
144+
* @typedef {MessageEditOptions} WebhookMessageEditOptions
146145
* @property {Snowflake} [threadId] The id of the thread this message belongs to
147146
* <info>For interaction webhooks, this property is ignored</info>
148147
*/

‎packages/discord.js/typings/index.d.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -6506,10 +6506,7 @@ export interface InteractionCollectorOptions<
65066506
export interface InteractionDeferReplyOptions {
65076507
/** @deprecated Use {@link InteractionDeferReplyOptions.flags} instead. */
65086508
ephemeral?: boolean;
6509-
flags?: BitFieldResolvable<
6510-
Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications'>,
6511-
MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
6512-
>;
6509+
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral>;
65136510
withResponse?: boolean;
65146511
/** @deprecated Use {@link InteractionDeferReplyOptions.withResponse} instead. */
65156512
fetchReply?: boolean;
@@ -7240,7 +7237,7 @@ export interface WebhookEditOptions {
72407237
reason?: string;
72417238
}
72427239

7243-
export interface WebhookMessageEditOptions extends Omit<MessageEditOptions, 'flags'> {
7240+
export interface WebhookMessageEditOptions extends MessageEditOptions {
72447241
threadId?: Snowflake;
72457242
}
72467243

0 commit comments

Comments
 (0)
Please sign in to comment.