From 0c591c0f93b23adc78ddf206305ed9981add85c2 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 31 Mar 2021 19:38:19 -0500 Subject: [PATCH] Fix scoring message filter --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f45cd69..5fc0fe3 100644 --- a/index.js +++ b/index.js @@ -22,7 +22,7 @@ async function startScoring(message) { let scoreB = 0; const scoreboard = await message.channel.send(`Here's the score:\nTeam A: ${scoreA}\nTeam B: ${scoreB}`) .then((scoreboard) => { - const filter = m => m.content.includes('do be'); + const filter = m => m.content.includes('$score'); const collector = message.channel.createMessageCollector(filter, { time: 1500000 }); collector.on('collect', m => { if (m.content.toLowerCase() === "$score a+4") { @@ -41,7 +41,7 @@ async function startScoring(message) { //m.delete({ timeout: 1000 }).catch(console.error); scoreB += 10; scoreboard.channel.send(`Here's the score:\nTeam A: ${scoreA}\nTeam B: ${scoreB}`).catch(console.error); - } else if (m.content === "do be scoring stop") { + } else if (m.content === "$score finish") { //m.delete({ timeout: 1000 }).catch(console.error); scoreboard.delete({ timeout: 1000 }); m.channel.send(`**FINAL SCORE:**\nTeam A: ${scoreA}\nTeam B: ${scoreB}`).catch(console.error);