diff --git a/packages/discord.js/src/structures/interfaces/InteractionResponses.js b/packages/discord.js/src/structures/interfaces/InteractionResponses.js index f696f085197e..5e8b2bcc6165 100644 --- a/packages/discord.js/src/structures/interfaces/InteractionResponses.js +++ b/packages/discord.js/src/structures/interfaces/InteractionResponses.js @@ -197,7 +197,7 @@ class InteractionResponses { }); this.deferred = true; - return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interaction?.id); + return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message?.interaction?.id); } /** diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 617e96c90fc4..7aee9e1512ca 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1974,8 +1974,6 @@ export interface ModalMessageModalSubmitInteraction>>; - deferUpdate(options: InteractionDeferUpdateOptions & { fetchReply: true }): Promise; - deferUpdate(options?: InteractionDeferUpdateOptions): Promise>>; inGuild(): this is ModalMessageModalSubmitInteraction<'raw' | 'cached'>; inCachedGuild(): this is ModalMessageModalSubmitInteraction<'cached'>; inRawGuild(): this is ModalMessageModalSubmitInteraction<'raw'>; @@ -2006,6 +2004,8 @@ export class ModalSubmitInteraction extend public deferReply(options?: InteractionDeferReplyOptions): Promise>>; public fetchReply(): Promise>>; public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise>>; + public deferUpdate(options: InteractionDeferUpdateOptions & { fetchReply: true }): Promise; + public deferUpdate(options?: InteractionDeferUpdateOptions): Promise>>; public inGuild(): this is ModalSubmitInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ModalSubmitInteraction<'cached'>; public inRawGuild(): this is ModalSubmitInteraction<'raw'>;