allow using without being in guild

This commit is contained in:
loicbersier 2020-03-19 23:29:53 +01:00
parent 3b2e306977
commit 422cf38dd5

View file

@ -35,9 +35,9 @@ class FeedbackCommand extends Command {
const channel = this.client.channels.resolve(feedbackChannel); const channel = this.client.channels.resolve(feedbackChannel);
const Embed = this.client.util.embed() const Embed = this.client.util.embed()
.setAuthor(`${message.author.username} (${message.author.id})`, message.author.displayAvatarURL()) .setAuthor(`${message.author.username} (${message.author.id})`, message.author.displayAvatarURL());
.addField('Guild', `${message.guild.name} (${message.guild.id})`, true) if (message.guild) Embed.addField('Guild', `${message.guild.name} (${message.guild.id})`, true);
.addField('Feedback', args.text) Embed.addField('Feedback', args.text)
.setTimestamp(); .setTimestamp();
channel.send({embed: Embed}); channel.send({embed: Embed});