Not sure how this got moved

This commit is contained in:
dangered wolf 2022-07-14 21:23:18 -04:00
parent 0749e2d9b7
commit 21185c5686
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58

View file

@ -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(