Drop: Hightlight first prints and shiny cards in claim messages
This commit is contained in:
@@ -104,7 +104,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
let reply = await i.reply({ content: `${i.user} (${claimUser.id}) claimed a card! [${cards[cardId].identifier}]`, ephemeral: false, fetchReply: true });
|
let reply = await i.reply({ content: `${i.user} (${claimUser.id}) claimed a card! [${cards[cardId].identifier}]`, ephemeral: false, fetchReply: true });
|
||||||
collectionReplies.push({ ref: reply, characterName: character.name });
|
collectionReplies.push({ ref: reply, characterName: character.name, card: cards[cardId] });
|
||||||
let newRow = ReplyUtils.recreateComponents(i.message.components);
|
let newRow = ReplyUtils.recreateComponents(i.message.components);
|
||||||
newRow.components[cardId].setLabel("Claimed");
|
newRow.components[cardId].setLabel("Claimed");
|
||||||
newRow.components[cardId].setStyle(ButtonStyle.Success);
|
newRow.components[cardId].setStyle(ButtonStyle.Success);
|
||||||
@@ -118,7 +118,11 @@ module.exports = {
|
|||||||
let dropHistory = {};
|
let dropHistory = {};
|
||||||
for (reply of collectionReplies) {
|
for (reply of collectionReplies) {
|
||||||
//TODO: strings shouldn't be inlined. Needs refactoring
|
//TODO: strings shouldn't be inlined. Needs refactoring
|
||||||
reply.ref.edit({ content: `${reply.ref.content.replace('a card', reply.characterName)}` });
|
let notableProps = [];
|
||||||
|
if (reply.card.printNr == 1) notableProps.push("📦 First Print");
|
||||||
|
if (reply.card.quality == 6) notableProps.push("<a:sparklu:1019505245572837428> Shiny");
|
||||||
|
|
||||||
|
reply.ref.edit({ content: `${reply.ref.content.replace('a card', reply.characterName)} ${notableProps.join()}` });
|
||||||
}
|
}
|
||||||
console.log(`Collected ${collected.size} interactions.`);
|
console.log(`Collected ${collected.size} interactions.`);
|
||||||
for (let card of cards) {
|
for (let card of cards) {
|
||||||
|
|||||||
Reference in New Issue
Block a user