diff --git a/src/endpoints/management/create_bracket.ts b/src/endpoints/management/create_bracket.ts index 0c74f32..e4e4660 100644 --- a/src/endpoints/management/create_bracket.ts +++ b/src/endpoints/management/create_bracket.ts @@ -30,6 +30,7 @@ export default { // Calculate the winners from the previous bracket let r = await request.server.inject(`/bracket/winners`); var quotes: string[] = JSON.parse(r.payload).winners; + var winner_count = quotes.length; // Ensure that the all elimination limit didn't get hit if (quotes.length > Math.floor(config.discord.quote_max / 2)) { @@ -53,7 +54,7 @@ export default { { description: `Note: If **more than ${Math.floor(config.discord.quote_max / 2)}** of the quotes tie, they will all be eliminated, otherwise, the ones that tie will move on to the next bracket.`, fields: quotes.map((quote, i) => { return { - name: `${i < quotes.length ? '👑 ' : ''}Quote: ${i + 1}`, + name: `${i < winner_count ? '👑 ' : ''}Quote: ${i + 1}`, value: quote, }}), } @@ -70,7 +71,7 @@ export default { return { label: `Quote ${i + 1}`, value: i, - emoji: i < quotes.length ? { + emoji: i < winner_count ? { name: `👑` } : null }