Skip to content

Commit

Permalink
Remove catch
Browse files Browse the repository at this point in the history
  • Loading branch information
TastyPumPum committed Aug 6, 2024
1 parent 6ebc564 commit 5b3cd93
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/mahoji/commands/leaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ async function minigamesLb(
FROM user_stats
WHERE "tithe_farms_completed" > 10
ORDER BY "tithe_farms_completed" DESC
LIMIT 10;`
LIMIT 100;`
);

doMenu(
Expand Down Expand Up @@ -330,7 +330,7 @@ async function minigamesLb(
// General Minigame handling with raw SQL
const minValue = column === 'champions_challenge' ? 1 : 10;

try {

const minigameResults = await prisma.$queryRawUnsafe<{ id: string; score: number }[]>(
`SELECT user_id::text as id, ${column} AS score
FROM minigames
Expand All @@ -349,10 +349,7 @@ async function minigamesLb(
title: `${minigame.name} Leaderboard`,
ironmanOnly
});
} catch (error) {
console.error('Error fetching minigame leaderboard:', error);
return 'An error occurred while fetching the leaderboard. Please try again later.';
}

}

async function clLb(
Expand Down

0 comments on commit 5b3cd93

Please sign in to comment.