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.";