Display links in all embed URLs

This commit is contained in:
Dragon Fire
2020-03-28 21:57:02 -04:00
parent 3ce12b79cd
commit 1c272e3307
17 changed files with 44 additions and 36 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const { embedURL } = require('../../util/Util');
module.exports = class CreditCommand extends Command {
constructor(client) {
@@ -25,8 +26,8 @@ module.exports = class CreditCommand extends Command {
.setTitle(command.name)
.setColor(0x7289DA)
.setDescription(command.credit.map(credit => {
if (!credit.reasonURL) return `[${credit.name}](${credit.url}) (${credit.reason})`;
return `[${credit.name}](${credit.url}) ([${credit.reason}](${credit.reasonURL}))`;
if (!credit.reasonURL) return `${embedURL(credit.name, credit.url)} (${credit.reason})`;
return `${embedURL(credit.name, credit.url)} (${embedURL(credit.reason, credit.reasonURL)})`;
}).join('\n'));
return msg.embed(embed);
}