Implement merge change
This commit is contained in:
parent
f726a613ea
commit
6f42cfb8f6
1 changed files with 7 additions and 1 deletions
|
@ -24,12 +24,18 @@ export default class DropEmbedHelper {
|
||||||
AppLogger.LogWarn("CardDropHelperMetadata/GenerateDropEmbed", `Card's colour override is invalid: ${drop.card.id}, ${drop.card.colour}`);
|
AppLogger.LogWarn("CardDropHelperMetadata/GenerateDropEmbed", `Card's colour override is invalid: ${drop.card.id}, ${drop.card.colour}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let imageUrl = `attachment://${imageFileName}`;
|
||||||
|
|
||||||
|
if (drop.card.path.startsWith("http://") || drop.card.path.startsWith("https://")) {
|
||||||
|
imageUrl = drop.card.path;
|
||||||
|
}
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setTitle(drop.card.name)
|
.setTitle(drop.card.name)
|
||||||
.setDescription(description)
|
.setDescription(description)
|
||||||
.setFooter({ text: `${CardRarityToString(drop.card.type)} · ${drop.card.id}` })
|
.setFooter({ text: `${CardRarityToString(drop.card.type)} · ${drop.card.id}` })
|
||||||
.setColor(colour)
|
.setColor(colour)
|
||||||
.setImage(`attachment://${imageFileName}`)
|
.setImage(imageUrl)
|
||||||
.addFields([
|
.addFields([
|
||||||
{
|
{
|
||||||
name: "Claimed",
|
name: "Claimed",
|
||||||
|
|
Loading…
Reference in a new issue