Collection: Fix username not showing as the title

FIXME: Find a better way to pass usernames.
This commit is contained in:
2023-03-09 13:10:04 +01:00
parent a12c0a8211
commit 4c4a581a03

View File

@@ -42,6 +42,7 @@ module.exports = {
permissionLevel: 0,
async execute(interaction) {
let user = await UserUtils.getUserByDiscordId(interaction.member.id);
user.displayName = interaction.member.displayName; //FIXME: manually attaching the displayName is very hacky. We need to find a better way of passing along usernames!
let offset = 0;
let groupDupes = false;
const uid = interaction.id;
@@ -160,7 +161,7 @@ module.exports = {
let total = group ? cards.count.length : cards.count;
//create embed using embedBuilder
let embed = new EmbedBuilder()
.setTitle(`$'s collection`)
.setTitle(`${user.displayName}'s collection`)
.setColor(0x00ff00)
.setTimestamp()
.setFooter({ text: `Cards ${pageStart} - ${pageEnd} / ${total}` });