diff --git a/bot/src/chartSearch/buildChartEmbed.ts b/bot/src/chartSearch/buildChartEmbed.ts index ac88bdf14..489f763f0 100644 --- a/bot/src/chartSearch/buildChartEmbed.ts +++ b/bot/src/chartSearch/buildChartEmbed.ts @@ -67,10 +67,11 @@ export const buildChartEmbed = async => { try { - const { searchResults, songId, playtype, game } = args; - + const { searchResults, songId, playtype, game, IIDExtra } = args; const embed = new MessageEmbed().setColor("#cc527a"); if (!songId && searchResults) { @@ -81,18 +82,29 @@ export const buildChartEmbed = async a.levelNum - b.levelNum); + const filteredCharts = details.charts.filter((chart) => { + if (IIDExtra) { + return true; + } else { + if (chart.data && !(chart.data as any)?.["2dxtraSet"]) { + return true; + } + } + + return false; + }); + const sortedCharts = filteredCharts.sort((a, b) => a.levelNum - b.levelNum); for (const chart of sortedCharts) { try { const PB = await getPBForChart(chart.chartID, chart.playtype, game); embed.addField( `${chart.difficulty} (${chart.level})`, - `Server Top: **[${PB.username}](https://kamaitachi.xyz/dashboard/profiles/${ + `Server Top: **[${PB.username}](https://kamaitachi.xyz/dashboard/users/${ PB.id - }/games/${game}?playtype=${playtype})**\n${PB.scoreData.percent.toFixed(2)}% [${ - PB.scoreData.score - }]\n${PB.scoreData.grade} [${PB.scoreData.lamp}]\n${Object.keys(PB.calculatedData) + }/games/${game}/${playtype})**\n${PB.scoreData.percent.toFixed(2)}% [${PB.scoreData.score}]\n${ + PB.scoreData.grade + } [${PB.scoreData.lamp}]\n${Object.keys(PB.calculatedData) .map((item) => { return `${item}: ${formatGameScoreRating( { game, playtype },