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>
This commit is contained in:
Naiyar
2025-01-14 20:16:33 +06:00
committed by GitHub
parent a65c982ddb
commit 1fd587c935
2 changed files with 3 additions and 7 deletions

View File

@@ -141,8 +141,7 @@ class Webhook {
/** /**
* Options that can be passed into editMessage. * Options that can be passed into editMessage.
* @typedef {BaseMessageOptions} WebhookMessageEditOptions * @typedef {MessageEditOptions} WebhookMessageEditOptions
* @property {Attachment[]} [attachments] Attachments to send with the message
* @property {Snowflake} [threadId] The id of the thread this message belongs to * @property {Snowflake} [threadId] The id of the thread this message belongs to
* <info>For interaction webhooks, this property is ignored</info> * <info>For interaction webhooks, this property is ignored</info>
*/ */

View File

@@ -6184,10 +6184,7 @@ export interface InteractionCollectorOptions<
} }
export interface InteractionDeferReplyOptions { export interface InteractionDeferReplyOptions {
flags?: BitFieldResolvable< flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral>;
Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications'>,
MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
>;
withResponse?: boolean; withResponse?: boolean;
} }
@@ -6910,7 +6907,7 @@ export interface WebhookEditOptions {
reason?: string; reason?: string;
} }
export interface WebhookMessageEditOptions extends Omit<MessageEditOptions, 'flags'> { export interface WebhookMessageEditOptions extends MessageEditOptions {
threadId?: Snowflake; threadId?: Snowflake;
} }