Files
xiao/commands/util/credit.js
T
Daniel Odendahl Jr 45c8d62dd5 Credit Command
2019-04-14 00:03:38 +00:00

30 lines
731 B
JavaScript

const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
module.exports = class CreditCommand extends Command {
constructor(client) {
super(client, {
name: 'credit',
group: 'util',
memberName: 'credit',
description: 'Responds with a command\'s credits list.',
guarded: true,
args: [
{
key: 'command',
prompt: 'Which command would you like to view the credits list of?',
type: 'command'
}
]
});
}
run(msg, { command }) {
const embed = new MessageEmbed()
.setTitle(command.name)
.setColor(0x7289DA)
.setDescription(command.credit.map(credit => `[${credit.name}](${credit.url})`).join('\n'));
return msg.embed(embed);
}
};