From 21185c5686053aa6fa58170f54a8bc06ef9299f9 Mon Sep 17 00:00:00 2001 From: dangered wolf <d@ngeredwolf.me> Date: Thu, 14 Jul 2022 21:23:18 -0400 Subject: [PATCH] Not sure how this got moved --- src/card.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/card.ts b/src/card.ts index d525750..493e390 100644 --- a/src/card.ts +++ b/src/card.ts @@ -70,19 +70,19 @@ export const renderCard = async ( values.choice4_count.string_value ); totalVotes += parseInt(values.choice4_count.string_value); - - for (const [label, votes] of Object.entries(choices)) { - // render bar - const bar = '█'.repeat(Math.round((votes / totalVotes || 0) * barLength)); - str += `${bar} - ${label} (${Math.round((votes / totalVotes || 0) * 100)}%) - `; - } - - str += `\n${totalVotes} votes · ${timeLeft}`; - - console.log(str); } + + for (const [label, votes] of Object.entries(choices)) { + // render bar + const bar = '█'.repeat(Math.round((votes / totalVotes || 0) * barLength)); + str += `${bar} +${label} (${Math.round((votes / totalVotes || 0) * 100)}%) + `; + } + + str += `\n${totalVotes} votes · ${timeLeft}`; + + console.log(str); /* Oh good, a non-Twitter video URL! This enables YouTube embeds and stuff to just work */ } else if (typeof values.player_url !== 'undefined') { headers.push(