diff --git a/packages/discord.js/src/client/actions/InteractionCreate.js b/packages/discord.js/src/client/actions/InteractionCreate.js index c079121c7f6f..434fb0c0689c 100644 --- a/packages/discord.js/src/client/actions/InteractionCreate.js +++ b/packages/discord.js/src/client/actions/InteractionCreate.js @@ -20,7 +20,7 @@ class InteractionCreateAction extends Action { const client = this.client; // Resolve and cache partial channels for Interaction#channel getter - const channel = this.getChannel(data); + const channel = data.channel && this.getChannel(data.channel); // Do not emit this for interactions that cache messages that are non-text-based. let InteractionClass; diff --git a/packages/discord.js/src/structures/BaseInteraction.js b/packages/discord.js/src/structures/BaseInteraction.js index 3b6db688ef02..967350fd0449 100644 --- a/packages/discord.js/src/structures/BaseInteraction.js +++ b/packages/discord.js/src/structures/BaseInteraction.js @@ -46,7 +46,7 @@ class BaseInteraction extends Base { * The id of the channel this interaction was sent in * @type {?Snowflake} */ - this.channelId = data.channel_id ?? null; + this.channelId = data.channel?.id ?? null; /** * The id of the guild this interaction was sent in