This commit is contained in:
Daniel Odendahl Jr
2018-11-23 02:19:05 +00:00
parent 52fecacaff
commit abcec638a0
+2 -1
View File
@@ -61,7 +61,8 @@ module.exports = class WordChainCommand extends Command {
const player = userTurn ? msg.author : opponent;
const letter = lastWord.charAt(lastWord.length - 1);
await msg.say(`It's ${player}'s turn! The letter is **${letter}**.`);
const filter = res => res.author.id === player.id && /^[a-zA-Z']+$/i.test(res.content) && res.content.length < 50;
const filter = res =>
res.author.id === player.id && /^[a-zA-Z']+$/i.test(res.content) && res.content.length < 50;
const wordChoice = await msg.channel.awaitMessages(filter, {
max: 1,
time: time * 1000