From d8905a279a49b87d3adbbbc9fee4e61ae8bdea7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Gro=C3=9F?= Date: Mon, 26 Sep 2022 12:22:53 +0200 Subject: [PATCH] Drop: Added icons if drop contains FPs or shiny cards as well as the droppers name --- commands/drop.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/commands/drop.js b/commands/drop.js index ddfb098..cca6bfb 100644 --- a/commands/drop.js +++ b/commands/drop.js @@ -75,22 +75,28 @@ module.exports = { const row = new ActionRowBuilder(); let deckImage = await Rendering.renderCardStack(cards); - + let notableProps = []; for (let i = 0; i < cards.length; i++) { - //Add claim button for each card + //Add claim button and notable prop text for each card row.addComponents( new ButtonBuilder() .setCustomId(`claim-${i}-${cards[i].identifier}`) .setLabel(`Claim ${i+1}`) .setStyle(ButtonStyle.Primary), - ); + ); + if (cards[i].quality == QUALITY.SHINY) { + notableProps.push(``); + } + if (cards[i].printNr == 1) { + notableProps.push(`📦`); + } } //add 10 experience to the user await user.addExperience(10, 'drop'); const file = new AttachmentBuilder(deckImage); - const message = await interaction.editReply({ content: 'asd', components: [row], files: [file], fetchReply: true }); + const message = await interaction.editReply({ content: `${interaction.member} Dropped 3 cards.\n${notableProps.join(" ")}`, components: [row], files: [file], fetchReply: true }); let dropHistory = { dropper: user.id,