Make it work in dm too

This commit is contained in:
loicbersier 2020-04-27 17:03:36 +02:00
parent 2b93b03816
commit 68b32fc287

View file

@ -172,9 +172,10 @@ class tweetCommand extends Command {
.addField('Link', `https://twitter.com/i/status/${tweetid}`, true) .addField('Link', `https://twitter.com/i/status/${tweetid}`, true)
.addField('Tweet ID', tweetid, true) .addField('Tweet ID', tweetid, true)
.addField('Author', `${message.author.username} (${message.author.id})`, true) .addField('Author', `${message.author.username} (${message.author.id})`, true)
.addField('Guild', `${message.guild.name} (${message.guild.id})`, true)
.setTimestamp(); .setTimestamp();
if (message.guild) Embed.addField('Guild', `${message.guild.name} (${message.guild.id})`, true);
if (Attachment[0]) Embed.setImage(Attachment[0].url); if (Attachment[0]) Embed.setImage(Attachment[0].url);
channel = client.channels.resolve(twiChannel); channel = client.channels.resolve(twiChannel);