From 7c5ba65b0ef0b2dfce5f963bd8f6a639e3dcefcc Mon Sep 17 00:00:00 2001 From: "Isaac (eartharoid)" Date: Mon, 7 Sep 2020 10:01:29 +0100 Subject: [PATCH] minor stuff you can't remove yourself anymore --- src/commands/close.js | 2 +- src/commands/remove.js | 2 +- src/modules/archive.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/close.js b/src/commands/close.js index 5281a98..46b89d3 100644 --- a/src/commands/close.js +++ b/src/commands/close.js @@ -154,7 +154,7 @@ module.exports = { && fs.existsSync(`user/transcripts/raw/entities/${ticket.get('channel')}.json`) ) - embed.addField('Web archive', `${await archive.export(Ticket, channel)}`); + embed.addField('Web archive', await archive.export(Ticket, channel)); if (embed.fields.length < 1) diff --git a/src/commands/remove.js b/src/commands/remove.js index 3ee11c9..48b2de3 100644 --- a/src/commands/remove.js +++ b/src/commands/remove.js @@ -68,7 +68,7 @@ module.exports = { let member = guild.member(message.mentions.users.first() || guild.members.cache.get(args[0])); - if(!member || member.id === guild.me.id) + if(!member || member.id === message.author.id || member.id === guild.me.id) return message.channel.send( new MessageEmbed() .setColor(config.err_colour) diff --git a/src/modules/archive.js b/src/modules/archive.js index a78bb7a..8f995cd 100644 --- a/src/modules/archive.js +++ b/src/modules/archive.js @@ -153,6 +153,7 @@ module.exports.export = (Ticket, channel) => new Promise((resolve, reject) => { resolve(res.url); }).catch(e => { + log.warn(e); return resolve(e); }); });