From 62ab9eb6c731edd8b3374c6a973a4ba2a429902d Mon Sep 17 00:00:00 2001 From: Isaac Date: Thu, 9 Feb 2023 17:34:17 +0000 Subject: [PATCH] fix: don't throw errors on every message if a guild isn't configured --- src/listeners/client/messageCreate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/listeners/client/messageCreate.js b/src/listeners/client/messageCreate.js index 46386e4..1cee0ea 100644 --- a/src/listeners/client/messageCreate.js +++ b/src/listeners/client/messageCreate.js @@ -181,6 +181,7 @@ module.exports = class extends Listener { } } else { const settings = await client.prisma.guild.findUnique({ where: { id: message.guild.id } }); + if (!settings) return; let ticket = await client.prisma.ticket.findUnique({ where: { id: message.channel.id } }); if (ticket) {