fedimbed.polls: * 100 percentages
This commit is contained in:
parent
d209d12506
commit
0e4aa68fc9
1 changed files with 3 additions and 3 deletions
|
@ -623,9 +623,9 @@ async function processUrl(msg, url, spoiler = false) {
|
||||||
const percent = o.count / poll.total;
|
const percent = o.count / poll.total;
|
||||||
const bar = Math.round(percent * 30);
|
const bar = Math.round(percent * 30);
|
||||||
|
|
||||||
return `**${o.name}** (${percent.toFixed(2)}%)\n\`[${"=".repeat(
|
return `**${o.name}** (${(percent * 100).toFixed(
|
||||||
bar
|
2
|
||||||
)}${" ".repeat(30 - bar)}]\``;
|
)}%)\n\`[${"=".repeat(bar)}${" ".repeat(30 - bar)}]\``;
|
||||||
})
|
})
|
||||||
.join("\n\n") +
|
.join("\n\n") +
|
||||||
`\n\nEnds: <t:${Math.floor(poll.end.getTime() / 1000)}:R>`,
|
`\n\nEnds: <t:${Math.floor(poll.end.getTime() / 1000)}:R>`,
|
||||||
|
|
Loading…
Reference in a new issue