Fix m->d poll questions over 45 characters
This commit is contained in:
@@ -55,10 +55,10 @@ async function* _interact({data, message, member, user}, {api}) {
|
|||||||
title: "Poll",
|
title: "Poll",
|
||||||
components: [{
|
components: [{
|
||||||
type: DiscordTypes.ComponentType.TextDisplay,
|
type: DiscordTypes.ComponentType.TextDisplay,
|
||||||
content: `-# ${pollComponents.getMultiSelectString(pollRow.max_selections, options.length)}`
|
content: `## ${pollRow.question_text}`
|
||||||
}, {
|
}, {
|
||||||
type: DiscordTypes.ComponentType.Label,
|
type: DiscordTypes.ComponentType.Label,
|
||||||
label: pollRow.question_text,
|
label: pollComponents.getMultiSelectString(pollRow.max_selections, options.length),
|
||||||
component: {
|
component: {
|
||||||
type: DiscordTypes.ComponentType.RadioGroup,
|
type: DiscordTypes.ComponentType.RadioGroup,
|
||||||
custom_id: "POLL_MODAL_SELECTION",
|
custom_id: "POLL_MODAL_SELECTION",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const setupEmojis = sync.require("../actions/setup-emojis")
|
|||||||
*/
|
*/
|
||||||
function getMedal(topAnswers, count) {
|
function getMedal(topAnswers, count) {
|
||||||
const winningOrTied = count && topAnswers[0].count === count
|
const winningOrTied = count && topAnswers[0].count === count
|
||||||
const secondOrTied = !winningOrTied && count && topAnswers[1]?.count === count && topAnswers.slice(-1)[0].count !== count
|
const secondOrTied = !winningOrTied && count && topAnswers[1]?.count === count && topAnswers.slice(-1)[0].count !== count
|
||||||
const thirdOrTied = !winningOrTied && !secondOrTied && count && topAnswers[2]?.count === count && topAnswers.slice(-1)[0].count !== count
|
const thirdOrTied = !winningOrTied && !secondOrTied && count && topAnswers[2]?.count === count && topAnswers.slice(-1)[0].count !== count
|
||||||
const medal =
|
const medal =
|
||||||
( winningOrTied ? "🥇"
|
( winningOrTied ? "🥇"
|
||||||
|
|||||||
Reference in New Issue
Block a user