From 9e30d2e12065e5ed945c61d1b7b495ffeb67ccbe Mon Sep 17 00:00:00 2001 From: ForGetFulSkyBro Date: Sun, 31 Dec 2023 20:01:36 -0500 Subject: [PATCH] fix: unknown interaction --- src/events/interactionCreate.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 1f8a901a..85bb3af5 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -7,6 +7,8 @@ import { captureException } from "@sentry/node"; const event: Event = { event: "interactionCreate", execute: async (client: WouldYou, interaction: Interaction) => { + if (!interaction || !interaction.channel) return; + const user = await UserModel.findOne({ userID: interaction.user.id }); if (!user) {