From 70cdadd6e853da4db881ddbd55db2f773055a94b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 18 Apr 2021 09:56:52 -0400 Subject: [PATCH] support smart quotes in aki --- commands/games-sp/akinator.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/games-sp/akinator.js b/commands/games-sp/akinator.js index cf38dfcf..9352ad7a 100644 --- a/commands/games-sp/akinator.js +++ b/commands/games-sp/akinator.js @@ -68,7 +68,10 @@ module.exports = class AkinatorCommand extends Command { **${aki.currentStep + 1}.** ${aki.question} (${Math.round(Number.parseInt(aki.progress, 10))}%) ${aki.answers.join(' | ')}${aki.currentStep > 0 ? ` | Back` : ''} | End `); - const filter = res => res.author.id === msg.author.id && answers.includes(res.content.toLowerCase()); + const filter = res => { + const content = res.content.toLowerCase().replace(/’/g, '\''); + return res.author.id === msg.author.id && answers.includes(content); + }; const msgs = await msg.channel.awaitMessages(filter, { max: 1, time: 30000