From 6f42cfb8f6d511a1da295b8f19bc35734ca2e0fe Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Wed, 22 Jan 2025 17:50:15 +0000 Subject: [PATCH] Implement merge change --- src/helpers/DropHelpers/DropEmbedHelper.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/helpers/DropHelpers/DropEmbedHelper.ts b/src/helpers/DropHelpers/DropEmbedHelper.ts index ba1ba47..c739de7 100644 --- a/src/helpers/DropHelpers/DropEmbedHelper.ts +++ b/src/helpers/DropHelpers/DropEmbedHelper.ts @@ -24,12 +24,18 @@ export default class DropEmbedHelper { 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() .setTitle(drop.card.name) .setDescription(description) .setFooter({ text: `${CardRarityToString(drop.card.type)} ยท ${drop.card.id}` }) .setColor(colour) - .setImage(`attachment://${imageFileName}`) + .setImage(imageUrl) .addFields([ { name: "Claimed",