Hangman: Don't allow filtered words in guesses

This commit is contained in:
Mia 2021-06-07 22:06:37 -05:00
parent 6363a1854c
commit 6f6b564f7f

View File

@ -324,6 +324,8 @@ export const commands: Chat.ChatCommands = {
createhelp: ["/hangman create [word], [hint] - Makes a new hangman game. Requires: % @ # &"],
guess(target, room, user) {
const word = this.filter(target);
if (word !== target) return this.errorReply(`You may not use filtered words in guesses.`);
this.parse(`/choose ${target}`);
},
guesshelp: [