Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: Allow only ephemeral for defer reply #10696

Merged
merged 8 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/discord.js/src/structures/Webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ 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
* <info>For interaction webhooks, this property is ignored</info>
*/
Expand Down
7 changes: 2 additions & 5 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6184,10 +6184,7 @@ export interface InteractionCollectorOptions<
}

export interface InteractionDeferReplyOptions {
flags?: BitFieldResolvable<
Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications'>,
MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
>;
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral>;
withResponse?: boolean;
}

Expand Down Expand Up @@ -6910,7 +6907,7 @@ export interface WebhookEditOptions {
reason?: string;
}

export interface WebhookMessageEditOptions extends Omit<MessageEditOptions, 'flags'> {
export interface WebhookMessageEditOptions extends MessageEditOptions {
threadId?: Snowflake;
}
imnaiyar marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
Loading