diff --git a/commands/100-games/deletegame.js b/commands/100-games/deletegame.js index f766aa6..9474103 100644 --- a/commands/100-games/deletegame.js +++ b/commands/100-games/deletegame.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js'); -const { getUserRegistration, deleteBeatenGameNum, checkGameStorageId, getRecentGameEntry, deleteBeatenGameId, getBeatenGameCount } = require('../../databaseHelperFunctions.js'); +const { getUserRegistration, deleteBeatenGameNum, checkGameStorageId, getRecentBeatenGameEntry, deleteBeatenGameId, getBeatenGameCount } = require('../../databaseHelperFunctions.js'); const { getCoverURL, getGameJson } = require('../../igdbHelperFunctions.js'); module.exports = { @@ -19,7 +19,7 @@ module.exports = { result = await deleteBeatenGameNum(beatGameNumber, userDatabaseEntry); } else { - const recentGame = await getRecentGameEntry(userDatabaseEntry.id); + const recentGame = await getRecentBeatenGameEntry(userDatabaseEntry.id); result = await deleteBeatenGameId(recentGame.id, userDatabaseEntry); } diff --git a/commands/100-games/recentbeat.js b/commands/100-games/recentbeat.js index 0b9133b..3fa8ea4 100644 --- a/commands/100-games/recentbeat.js +++ b/commands/100-games/recentbeat.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder, EmbedBuilder } = require('discord.js'); const { getCoverURL, getGameJson } = require('../../igdbHelperFunctions.js'); -const { getUserRegistration, getRecentGameEntry, getBeatenGameCount } = require('../../databaseHelperFunctions.js'); +const { getUserRegistration, getRecentBeatenGameEntry, getBeatenGameCount } = require('../../databaseHelperFunctions.js'); module.exports = { data: new SlashCommandBuilder() @@ -18,7 +18,7 @@ module.exports = { const userDatabaseEntry = await getUserRegistration(user); if (!userDatabaseEntry) return interaction.reply({ content: `Issue checking registration with "${interaction.user.username}".`, ephemeral: true }); - const gameDatabaseEntry = await getRecentGameEntry(userDatabaseEntry.id); + const gameDatabaseEntry = await getRecentBeatenGameEntry(userDatabaseEntry.id); if (!gameDatabaseEntry) return interaction.reply({ content: 'No game found.', ephemeral: true }); const body = `where id = ${ gameDatabaseEntry.igdb_id }; fields *;`;