From a18c585a791ae2dac47fa9e5deba3a7ef4725567 Mon Sep 17 00:00:00 2001 From: Lynn Date: Sun, 20 Oct 2024 18:58:57 +0200 Subject: [PATCH] Spoil usernames in whodunnit answers --- src/bot/bot.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bot/bot.ts b/src/bot/bot.ts index b67d607..cd490b3 100644 --- a/src/bot/bot.ts +++ b/src/bot/bot.ts @@ -132,8 +132,13 @@ export class KunaBot { const authors = entries.map(e => e.user); authors.sort(); - const questions = `Who defined which word? (${authors.join(', ')})\n\n${entries.map((e, i) => `${i + 1}. **${e.head}**`).join('\n')}`; - const answers = `Answers:\n\n${entries.map((e, i) => `${i + 1}. **${e.head}** ← ${e.user}`).join('\n')}`; + const poq = authors.join(', '); + const toa = entries.map((e, i) => `${i + 1}. **${e.head}**`).join('\n'); + const tiaotei = entries + .map((e, i) => `${i + 1}. **${e.head}** ← ||${e.user}||`) + .join('\n'); + const questions = `Who defined which word? (${poq})\n\n${toa}`; + const answers = `Answers:\n\n${tiaotei}`; this.hostQuiz(interaction, questions, answers); }