Create use effect command #419

Open
Vylpes wants to merge 26 commits from feature/380-use-effect into develop
Showing only changes of commit 6f42cfb8f6 - Show all commits

View file

@ -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",