mirror of
https://github.com/Brandon-Rozek/Rozbot.git
synced 2024-11-14 20:37:30 -05:00
Fixed case bug
This commit is contained in:
parent
7defad2af6
commit
21f8f3c057
1 changed files with 3 additions and 2 deletions
|
@ -56,9 +56,10 @@ module.exports = new Command("Hangman", condition, function(text, send, userData
|
|||
if (guessedLetters.indexOf(letter) !== -1) {
|
||||
send("You already guessed this letter");
|
||||
} else {
|
||||
if (word.toLowerCase().indexOf(letter.toLowerCase()) !== -1) {
|
||||
letterIndex = word.toLowerCase().indexOf(letter.toLowerCase());
|
||||
if (letterIndex !== -1) {
|
||||
send("The letter is in the word!");
|
||||
correctLetters.push(letter);
|
||||
correctLetters.push(word[letterIndex]);
|
||||
} else {
|
||||
send("The letter is not in the word..");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue