diff --git a/src/modules/misc.js b/src/modules/misc.js index 2ec6e4e..80d15c2 100644 --- a/src/modules/misc.js +++ b/src/modules/misc.js @@ -254,11 +254,14 @@ const vote = new Command("vote"); vote.category = CATEGORY; vote.helpText = "Start a yes/no vote"; vote.usage = "[topic]"; -vote.callback = async function (msg, line, [topic], {maybe}) { +vote.callback = async function (msg, line, topic, {maybe}) { if (!topic) return "No topic given."; + topic = topic.join(" "); return { - content: `**${msg.author.username}#${msg.author.discriminator}** has started a vote:\n**__${topic}__**\n<:ms_tick:503341995348066313>: Yes\n<:ms_cross:503341994974773250>: No${ + content: `**${msg.author.username}#${ + msg.author.discriminator + }** has started a vote:\n**__${topic}__**\n<:ms_tick:503341995348066313>: Yes\n<:ms_cross:503341994974773250>: No${ maybe ? "\n<:ms_tilda:581268710925271095>: Maybe/Uncertain" : "" }`, addReactions: [ @@ -572,10 +575,18 @@ search.callback = async function (msg, line, args, {results = 2}) { let out = `__**Results for \`${safeString(query)}\`**__\n`; for (const result of searchResults) { if (result.special_response) { - out += "> " + safeString(parseHtmlEntities(result.special_response.response.split("\n").join("\n> "))); + out += + "> " + + safeString( + parseHtmlEntities( + result.special_response.response.split("\n").join("\n> ") + ) + ); out += `\n<${encodeURI(result.special_response.source)}>`; } else { - out += `**${safeString(parseHtmlEntities(result.title))}** - <${encodeURI(result.url)}>`; + out += `**${safeString(parseHtmlEntities(result.title))}** - <${encodeURI( + result.url + )}>`; out += `\n> ${safeString(parseHtmlEntities(result.description))}`; } out += "\n\n";