From 5b5a8d914dcacb42da4eeb6d6a7d9d517a42dbfc Mon Sep 17 00:00:00 2001 From: baz Date: Sun, 31 Dec 2023 23:29:08 +0000 Subject: [PATCH] Fix time out --- commands/100-games/beatlist.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/100-games/beatlist.js b/commands/100-games/beatlist.js index 16f605e..d8fc7e6 100644 --- a/commands/100-games/beatlist.js +++ b/commands/100-games/beatlist.js @@ -8,6 +8,8 @@ module.exports = { .setDescription('Show the list of games you have beaten.') .addUserOption(option => option.setName('user').setDescription('The user to check')), async execute(interaction) { + await interaction.reply({ content: 'Searching for user...', ephemeral: true }); + let user = interaction.user; const userOption = interaction.options.getUser('user'); @@ -16,9 +18,7 @@ module.exports = { } const userDatabaseEntry = await getUserRegistration(user); - if (!userDatabaseEntry) return interaction.reply({ content: `Issue checking registration with "${user.username}".`, ephemeral: true }); - - await interaction.reply({ content: `Searching for ${user.username}...`, ephemeral: true }); + if (!userDatabaseEntry) return interaction.followUp({ content: `Issue checking registration with "${user.username}".`, ephemeral: true }); const beatenGamesDatabaseEntries = await getGames(userDatabaseEntry.id); if (!beatenGamesDatabaseEntries || beatenGamesDatabaseEntries.length == 0) return interaction.followUp({ content: 'No games found.', ephemeral: true });