mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
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:
@@ -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>
|
||||
*/
|
||||
|
||||
7
packages/discord.js/typings/index.d.ts
vendored
7
packages/discord.js/typings/index.d.ts
vendored
@@ -6506,10 +6506,7 @@ export interface InteractionCollectorOptions<
|
||||
export interface InteractionDeferReplyOptions {
|
||||
/** @deprecated Use {@link InteractionDeferReplyOptions.flags} instead. */
|
||||
ephemeral?: boolean;
|
||||
flags?: BitFieldResolvable<
|
||||
Extract<MessageFlagsString, 'Ephemeral' | 'SuppressEmbeds' | 'SuppressNotifications'>,
|
||||
MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications
|
||||
>;
|
||||
flags?: BitFieldResolvable<Extract<MessageFlagsString, 'Ephemeral'>, MessageFlags.Ephemeral>;
|
||||
withResponse?: boolean;
|
||||
/** @deprecated Use {@link InteractionDeferReplyOptions.withResponse} instead. */
|
||||
fetchReply?: boolean;
|
||||
@@ -7240,7 +7237,7 @@ export interface WebhookEditOptions {
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export interface WebhookMessageEditOptions extends Omit<MessageEditOptions, 'flags'> {
|
||||
export interface WebhookMessageEditOptions extends MessageEditOptions {
|
||||
threadId?: Snowflake;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user