From fc88b14e50dad3f867f7ec73c0f8bf8c0ef5c432 Mon Sep 17 00:00:00 2001 From: iDrunK65 Date: Sun, 9 Feb 2020 08:46:12 +0100 Subject: [PATCH] Update new.js --- commands/new.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/new.js b/commands/new.js index 2a5cdb3..593ca24 100644 --- a/commands/new.js +++ b/commands/new.js @@ -26,7 +26,7 @@ module.exports = { let id = message.author.id.toString().substr(0, 4) + message.author.discriminator; let chan = `ticket-${id}`; - if (message.guild.channels.some(channel => chan.includes(channel.name))) { + if (message.guild.channels.find(channel => channel.name === chan)) { if (config.useEmbeds) { const err1 = new Discord.RichEmbed() .setColor("#E74C3C") @@ -121,4 +121,4 @@ module.exports = { // command ends here }, -}; \ No newline at end of file +};