mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-08 15:19:14 +02:00
23
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
|
||||
module.exports = class EmbedCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'embed',
|
||||
group: 'text-edit',
|
||||
memberName: 'embed',
|
||||
description: 'Sends a message in an embed.',
|
||||
clientPermissions: ['EMBED_LINKS'],
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What text would you like to embed?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { text } = args;
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0x00AE86)
|
||||
.setTimestamp()
|
||||
.setDescription(text);
|
||||
return msg.embed(embed);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user