Drop/Rendering: Move stack sorting from rendering to drop

This commit is contained in:
2022-08-28 21:40:52 +02:00
parent 6c781785c3
commit cf7c2769e3
2 changed files with 1 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ module.exports = {
cards.push(newCard); cards.push(newCard);
} }
let reply = "You have dropped the following cards: \n"; cards.sort((a, b) => a.characterId - b.characterId);
const row = new ActionRowBuilder(); const row = new ActionRowBuilder();
let deckImage = await Rendering.renderCardStack(cards); let deckImage = await Rendering.renderCardStack(cards);
@@ -50,7 +50,6 @@ module.exports = {
id: card.characterId id: card.characterId
} }
}); });
reply += `IID: ${card.id} - ID:${card.identifier} \nP: ${card.printNr} Q: ${card.quality} \nC: ${character.name} \n----------\n`;
//Add claim button for each card //Add claim button for each card
row.addComponents( row.addComponents(

View File

@@ -7,7 +7,6 @@ const { Character } = require('../models');
module.exports = { module.exports = {
name: "Rendering", name: "Rendering",
renderCardStack: async function(cards) { renderCardStack: async function(cards) {
cards.sort((a, b) => a.charcterId - b.charcterId);
for (let card of cards) { for (let card of cards) {
console.log(`Iterating card ${card.id}`); console.log(`Iterating card ${card.id}`);