fedimbed: quick poll fix
This commit is contained in:
parent
e3a0eca03f
commit
5419caa553
1 changed files with 2 additions and 1 deletions
|
@ -1398,12 +1398,13 @@ async function processUrl(msg, url, spoiler = false, command = false) {
|
|||
container.components.push({
|
||||
type: 10,
|
||||
content:
|
||||
"> " +
|
||||
poll.options
|
||||
.map((o) => {
|
||||
const percent = o.count / poll.total;
|
||||
const bar = Math.round(percent * 32);
|
||||
|
||||
return `> **${o.name}** (${numberFormatter.format(o.count)}, ${Math.round(
|
||||
return `**${o.name}** (${numberFormatter.format(o.count)}, ${Math.round(
|
||||
percent * 100
|
||||
)}%\n> \`${"\u2588".repeat(bar)}${" ".repeat(32 - bar)}\``;
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue