misc updates

This commit is contained in:
baz 2024-02-11 21:17:21 +00:00
parent 95c52b7ad5
commit c31a3d6e04
2 changed files with 3 additions and 5 deletions

View File

@ -20,11 +20,9 @@ module.exports = {
const userDatabaseEntry = await getUserRegistration(user);
if (!userDatabaseEntry) return interaction.followUp({ content: `Issue checking registration with "${user.username}".`, ephemeral: true });
let databaseEntries = await getPlayingGames(userDatabaseEntry.id);
const databaseEntries = await getPlayingGames(userDatabaseEntry.id);
if (!databaseEntries || databaseEntries.length == 0) return interaction.followUp({ content: 'No games found.', ephemeral: true });
databaseEntries = databaseEntries.reverse();
let desc = '';
for (let i = 0; i < databaseEntries.length; i++) {

View File

@ -252,7 +252,7 @@ async function getRecentBeatenGameEntry(userId) {
}
async function getRecentGameEntry(userId, status) {
const beatenGameEntry = await LoggedGames.findOne({ where: { userId: userId, status: status }, order: [ [ 'updatedAt', 'ASC' ]] })
const beatenGameEntry = await LoggedGames.findOne({ where: { userId: userId, status: status }, order: [ [ 'updatedAt', 'DESC' ]] })
.catch((err) => {
console.log(err);
});