From 422cf38dd5923e166072c2da74ccc3bdbacf6ec7 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 19 Mar 2020 23:29:53 +0100 Subject: [PATCH] allow using without being in guild --- commands/utility/feedback.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/utility/feedback.js b/commands/utility/feedback.js index f222f9cd..b563d321 100644 --- a/commands/utility/feedback.js +++ b/commands/utility/feedback.js @@ -35,9 +35,9 @@ class FeedbackCommand extends Command { const channel = this.client.channels.resolve(feedbackChannel); const Embed = this.client.util.embed() - .setAuthor(`${message.author.username} (${message.author.id})`, message.author.displayAvatarURL()) - .addField('Guild', `${message.guild.name} (${message.guild.id})`, true) - .addField('Feedback', args.text) + .setAuthor(`${message.author.username} (${message.author.id})`, message.author.displayAvatarURL()); + if (message.guild) Embed.addField('Guild', `${message.guild.name} (${message.guild.id})`, true); + Embed.addField('Feedback', args.text) .setTimestamp(); channel.send({embed: Embed});