From 03520e4e3e90a61af4314d6b792b5570bf3dee69 Mon Sep 17 00:00:00 2001 From: LucasB25 <50886682+LucasB25@users.noreply.github.com> Date: Thu, 29 Aug 2024 20:24:41 +0200 Subject: [PATCH] Update MessageCreate.ts --- src/events/client/MessageCreate.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/events/client/MessageCreate.ts b/src/events/client/MessageCreate.ts index 974e7dc..b5ee1fb 100644 --- a/src/events/client/MessageCreate.ts +++ b/src/events/client/MessageCreate.ts @@ -45,6 +45,11 @@ export default class MessageCreate extends Event { const intervalMilliseconds = BigInt(ticketActivityCheckInterval * 60 * 1000); for (const { activityAt, lastCheckTime = 0n, channelId } of tickets) { + if (activityAt === null || lastCheckTime === null) { + this.client.logger.error(`Ticket ${channelId} has null activityAt or lastCheckTime.`); + continue; + } + const lastActivity = BigInt(activityAt); if (now - lastActivity > intervalMilliseconds && now - BigInt(lastCheckTime) > intervalMilliseconds) {