TypeError Cannot read properties of null (reading 'interaction')

I can't figure out where the error is coming from
TypeError: Cannot read properties of null (reading 'interaction')
at ModalSubmitInteraction.deferUpdate (C:\Users\AnthonyVault-Beelink\Documents\GitHub\wetbot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:200:96)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError: Cannot read properties of null (reading 'interaction')
at ModalSubmitInteraction.deferUpdate (C:\Users\AnthonyVault-Beelink\Documents\GitHub\wetbot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:200:96)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
djs:
async deferUpdate(options = {}) {
if (this.deferred || this.replied) throw new Error(ErrorCodes.InteractionAlreadyReplied);
await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
body: {
type: InteractionResponseType.DeferredMessageUpdate,
},
auth: false,
});
this.deferred = true;

return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interaction?.id);
}
async deferUpdate(options = {}) {
if (this.deferred || this.replied) throw new Error(ErrorCodes.InteractionAlreadyReplied);
await this.client.rest.post(Routes.interactionCallback(this.id, this.token), {
body: {
type: InteractionResponseType.DeferredMessageUpdate,
},
auth: false,
});
this.deferred = true;

return options.fetchReply ? this.fetchReply() : new InteractionResponse(this, this.message.interaction?.id);
}
InteractionResponse(this, this.message.interaction?.id) For some reason message is null
2 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
AnthonyVault
AnthonyVault2y ago
wetbot@0.5 F:\WETBOT_discordjs_v14 └── discord.js@14.1.2 node -v v16.10.0 Oh yes. I just destroying modal after receiving a response. But how can I destroy without this error I dont need reply. Then reply and immediately delete message?