From 4c4a581a0342d0689f27d97361fc54b62f07f58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Gro=C3=9F?= Date: Thu, 9 Mar 2023 13:10:04 +0100 Subject: [PATCH] Collection: Fix username not showing as the title FIXME: Find a better way to pass usernames. --- commands/collection.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/collection.js b/commands/collection.js index a921467..1c2cb06 100644 --- a/commands/collection.js +++ b/commands/collection.js @@ -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}` });