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) {