Button show answer always, show message image

This commit is contained in:
Dragon Fire
2020-10-19 13:52:42 -04:00
parent 3f9e09d7ac
commit 299f581e81
3 changed files with 9 additions and 3 deletions
+3
View File
@@ -1,5 +1,6 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const { null } = require('mathjs');
module.exports = class MessageCommand extends Command {
constructor(client) {
@@ -21,9 +22,11 @@ module.exports = class MessageCommand extends Command {
}
run(msg, { message }) {
const hasImage = message.attachments.size && message.attachments.first().width;
const embed = new MessageEmbed()
.setColor(message.member ? message.member.displayHexColor : 0x00AE86)
.setThumbnail(message.author.displayAvatarURL({ format: 'png', dynamic: true }))
.setImage(hasImage ? message.attachments.first().url : null)
.setAuthor(message.author.tag, message.author.displayAvatarURL({ format: 'png', dynamic: true }))
.setDescription(message.content)
.setTimestamp(message.createdAt)