Collection: Fix total count when grouping dupes

using array length if group is true. Fixes #47
This commit is contained in:
2023-02-26 14:49:59 +01:00
parent 1dde3a0a8c
commit 51f8d03a69

View File

@@ -157,13 +157,13 @@ module.exports = {
cards.rows = cards.rows ? cards.rows : cards;
let pageStart = offset + 1;
let pageEnd = offset + cards.rows.length;
let total = group ? cards.count.length : cards.count;
//create embed using embedBuilder
let embed = new EmbedBuilder()
.setTitle(`$'s collection`)
.setColor(0x00ff00)
.setTimestamp()
.setFooter({ text: `Cards ${pageStart} - ${pageEnd} / ${cards.count}` });
.setFooter({ text: `Cards ${pageStart} - ${pageEnd} / ${total}` });
//if the user has no cards, tell him
if (cards.count === 0) {