From 2a041b29ce1d777b9926964de5ad8deff4a64fb2 Mon Sep 17 00:00:00 2001 From: "Isaac (eartharoid)" Date: Mon, 5 Oct 2020 23:15:24 +0100 Subject: [PATCH] Update delete.js --- src/commands/delete.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/commands/delete.js b/src/commands/delete.js index 3964721..1d565a4 100644 --- a/src/commands/delete.js +++ b/src/commands/delete.js @@ -62,20 +62,19 @@ module.exports = { return message.channel.send(notTicket); } - if (message.author.id !== ticket.creator && !message.member.roles.cache.has(config.staff_role)) { - return channel.send( - new MessageEmbed() - .setColor(config.err_colour) - .setAuthor(message.author.username, message.author.displayAvatarURL()) - .setTitle(':x: **No permission**') - .setDescription(`You don't have permission to delete ${channel} as it does not belong to you and you are not staff.`) - .addField('Usage', `\`${config.prefix}${this.name} ${this.usage}\`\n`) - .addField('Help', `Type \`${config.prefix}help ${this.name}\` for more information`) - .setFooter(guild.name, guild.iconURL()) - ); - } } - + if (message.author.id !== ticket.creator && !message.member.roles.cache.has(config.staff_role)) + return channel.send( + new MessageEmbed() + .setColor(config.err_colour) + .setAuthor(message.author.username, message.author.displayAvatarURL()) + .setTitle(':x: **No permission**') + .setDescription(`You don't have permission to delete ${channel} as it does not belong to you and you are not staff.`) + .addField('Usage', `\`${config.prefix}${this.name} ${this.usage}\`\n`) + .addField('Help', `Type \`${config.prefix}help ${this.name}\` for more information`) + .setFooter(guild.name, guild.iconURL()) + ); + let success; let confirm = await message.channel.send(