Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TastyPumPum committed Nov 18, 2024
1 parent c49c95b commit f044213
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/mahoji/commands/leaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,29 +320,6 @@ async function minigamesLb(
return lbMsg(`${minigame.name} Leaderboard`);
}

if (minigame.name === 'Champions Challenge') {
const championsCompletions = await prisma.$queryRawUnsafe<{ id: string; amount: number }[]>(
`SELECT user_id::text as id, champions_challenge::int as amount
FROM minigames
INNER JOIN users ON users.id = minigames.user_id
WHERE champions_challenge > 1
${ironmanOnly ? 'AND "minion.ironman" = true' : ''}
ORDER BY champions_challenge DESC
LIMIT 100;`
);
return doMenuWrapper({
interaction,
user,
channelID,
users: championsCompletions.map(c => ({
id: c.id,
score: c.amount
})),
title: 'Champions Challenge Leaderboard',
ironmanOnly
});
}

// General Minigame handling with raw SQL
const minValue = column === 'champions_challenge' ? 1 : 10;

Expand Down

0 comments on commit f044213

Please sign in to comment.