From 5f8acc03d46ec7f489443e2c5d4072365d2da57d Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 11 Jul 2020 01:23:46 +0200 Subject: [PATCH] Also show the guild --- event/listeners/error.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/event/listeners/error.js b/event/listeners/error.js index 7c5f31a..03562d4 100644 --- a/event/listeners/error.js +++ b/event/listeners/error.js @@ -12,7 +12,7 @@ class errorListener extends Listener { } async exec(error, message, command) { - console.error(`Error happenend on the command: ${command.id}\n${error}\nOn the message: ${message}`); + console.error(`Error happened on the command: ${command.id}\n${error}\nOn the message: ${message}`); const channel = this.client.channels.resolve(errorChannel); const errorEmbed = this.client.util.embed() .setColor('RED') @@ -22,6 +22,7 @@ class errorListener extends Listener { .addField('Message', message, true); if (message.author) errorEmbed.addField('Author', `${message.author.tag} (${message.author.id})`); + if (message.guild) errorEmbed.addField('Guild', `${message.guild.name} (${message.guild.id})`); channel.send(errorEmbed);