Drop: Added icons if drop contains FPs or shiny cards as well as the droppers name
This commit is contained in:
@@ -75,22 +75,28 @@ module.exports = {
|
|||||||
|
|
||||||
const row = new ActionRowBuilder();
|
const row = new ActionRowBuilder();
|
||||||
let deckImage = await Rendering.renderCardStack(cards);
|
let deckImage = await Rendering.renderCardStack(cards);
|
||||||
|
let notableProps = [];
|
||||||
for (let i = 0; i < cards.length; i++) {
|
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(
|
row.addComponents(
|
||||||
new ButtonBuilder()
|
new ButtonBuilder()
|
||||||
.setCustomId(`claim-${i}-${cards[i].identifier}`)
|
.setCustomId(`claim-${i}-${cards[i].identifier}`)
|
||||||
.setLabel(`Claim ${i+1}`)
|
.setLabel(`Claim ${i+1}`)
|
||||||
.setStyle(ButtonStyle.Primary),
|
.setStyle(ButtonStyle.Primary),
|
||||||
);
|
);
|
||||||
|
if (cards[i].quality == QUALITY.SHINY) {
|
||||||
|
notableProps.push(`<a:sparklu:1019505245572837428>`);
|
||||||
|
}
|
||||||
|
if (cards[i].printNr == 1) {
|
||||||
|
notableProps.push(`📦`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//add 10 experience to the user
|
//add 10 experience to the user
|
||||||
await user.addExperience(10, 'drop');
|
await user.addExperience(10, 'drop');
|
||||||
|
|
||||||
const file = new AttachmentBuilder(deckImage);
|
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 = {
|
let dropHistory = {
|
||||||
dropper: user.id,
|
dropper: user.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user