mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Fix
This commit is contained in:
@@ -61,7 +61,7 @@ module.exports = class WordChainCommand extends Command {
|
|||||||
const player = userTurn ? msg.author : opponent;
|
const player = userTurn ? msg.author : opponent;
|
||||||
const letter = lastWord.charAt(lastWord.length - 1);
|
const letter = lastWord.charAt(lastWord.length - 1);
|
||||||
await msg.say(`It's ${player}'s turn! The letter is **${letter}**.`);
|
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, {
|
const wordChoice = await msg.channel.awaitMessages(filter, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: time * 1000
|
time: time * 1000
|
||||||
|
|||||||
Reference in New Issue
Block a user