From d921eb7b3fd0bd14952c00e79fa65ff4c9ad1613 Mon Sep 17 00:00:00 2001 From: baz Date: Sat, 20 Apr 2024 16:28:16 +0100 Subject: [PATCH] Updates to /globalbeatlist --- commands/100-games/globalbeatlist.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/commands/100-games/globalbeatlist.js b/commands/100-games/globalbeatlist.js index 508239a..0d33b3a 100644 --- a/commands/100-games/globalbeatlist.js +++ b/commands/100-games/globalbeatlist.js @@ -9,11 +9,11 @@ module.exports = { async execute(interaction) { await interaction.deferReply(); - const user = interaction.user; - const beatenGamesDatabaseEntries = await getAllBeatenGames(); let desc = ''; + desc = desc.concat('__Total: ', beatenGamesDatabaseEntries.length, '__\n'); + if (!beatenGamesDatabaseEntries || beatenGamesDatabaseEntries.length == 0) { desc = 'No games beaten yet.'; } else { @@ -27,9 +27,8 @@ module.exports = { const embed = new EmbedBuilder() .setColor(0x6441a5) - .setAuthor({ name: `${user.displayName}`, iconURL: user.avatarURL() }) .setThumbnail(interaction.client.user.avatarURL()) - .setTitle('Global Beat List') + .setTitle('The 100 Games Challenge Global Beat List') .setDescription(desc) .setFooter({ text: 'The Ochulus • 100 Games Challenge', iconURL: interaction.client.user.avatarURL() }) .setTimestamp();