From c5dd8823f6876374c6c141602513ad43abc1b1a6 Mon Sep 17 00:00:00 2001 From: DuAnti7423 <82730507+DuAnti7423@users.noreply.github.com> Date: Sun, 23 May 2021 10:39:24 +0200 Subject: [PATCH] Update close.js ID Support, Boolean Changes --- commands/close.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/close.js b/commands/close.js index 64340ab..f7100a0 100755 --- a/commands/close.js +++ b/commands/close.js @@ -13,7 +13,7 @@ module.exports = { description: supportbot.CloseTicketDesc, execute(message, args) { - if (supportbot.DeleteMessages == "true") message.delete(); + if (supportbot.DeleteMessages) message.delete(); console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`); @@ -28,7 +28,7 @@ module.exports = { } - if (supportbot.CloseConfirmation === "true") { + if (supportbot.CloseConfirmation) { const CloseTicketRequest = new Discord.MessageEmbed() .setTitle(`**${supportbot.ClosingTicket}**`) .setDescription(`Please confirm by repeating the following word.. \`${supportbot.ClosingConfirmation_Word}\` `) @@ -42,7 +42,7 @@ module.exports = { }).then( collected => { - let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog); + let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog) let user = message.author; let reason = args.join(" ") || "No Reason Provided."; @@ -94,9 +94,9 @@ module.exports = { } - if (supportbot.CloseConfirmation === "false") { + if (!supportbot.CloseConfirmation) { - let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog); + let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog) let user = message.author; let reason = args.join(" ") || "No Reason Provided.";