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