fix: don't throw errors on every message if a guild isn't configured

This commit is contained in:
Isaac 2023-02-09 17:34:17 +00:00
parent df725185eb
commit 62ab9eb6c7
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -181,6 +181,7 @@ module.exports = class extends Listener {
} }
} else { } else {
const settings = await client.prisma.guild.findUnique({ where: { id: message.guild.id } }); 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 } }); let ticket = await client.prisma.ticket.findUnique({ where: { id: message.channel.id } });
if (ticket) { if (ticket) {