fedimbed: poll visual parity with nitter polls
This commit is contained in:
parent
28fab3823a
commit
5b4b252c35
1 changed files with 4 additions and 4 deletions
|
@ -1285,11 +1285,11 @@ async function processUrl(msg, url, spoiler = false, command = false) {
|
||||||
poll.options
|
poll.options
|
||||||
.map((o) => {
|
.map((o) => {
|
||||||
const percent = o.count / poll.total;
|
const percent = o.count / poll.total;
|
||||||
const bar = Math.round(percent * 30);
|
const bar = Math.round(percent * 32);
|
||||||
|
|
||||||
return `**${o.name}** (${o.count}, ${Math.round(percent * 100)}%)\n\`[${"=".repeat(bar)}${" ".repeat(
|
return `**${o.name}** (${o.count}, ${Math.round(percent * 100)}%)\n\`${"\u2588".repeat(bar)}${" ".repeat(
|
||||||
30 - bar
|
32 - bar
|
||||||
)}]\``;
|
)}\``;
|
||||||
})
|
})
|
||||||
.join("\n\n") + `\n\n${poll.total} votes \u2022 Ends <t:${Math.floor(poll.end.getTime() / 1000)}:R>`,
|
.join("\n\n") + `\n\n${poll.total} votes \u2022 Ends <t:${Math.floor(poll.end.getTime() / 1000)}:R>`,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue