Files
xiao/commands/info/message.js
T
2018-08-15 19:34:34 -04:00

35 lines
1005 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
module.exports = class MessageInfoCommand extends Command {
constructor(client) {
super(client, {
name: 'message-info',
aliases: ['message', 'msg', 'msg-info', 'reply'],
group: 'info',
memberName: 'message',
description: 'Responds with detailed information on a message.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'message',
prompt: 'Which message would you like to get information on?',
type: 'message'
}
]
});
}
run(msg, { message }) {
const embed = new MessageEmbed()
.setColor(message.member ? message.member.displayHexColor : 0x00AE86)
.setThumbnail(message.author.displayAvatarURL())
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
.setDescription(message.content)
.setTimestamp(message.createdAt)
.setFooter(`ID: ${message.id}`)
.addField(' Jump', message.url);
return msg.embed(embed);
}
};