This commit is contained in:
NikolajDanger
2020-08-15 18:49:18 +02:00
parent 4b560bf1b9
commit 57aade39d1

View File

@@ -16,7 +16,7 @@ class Hangman():
if game == None: if game == None:
apiKey = self.bot.credentials.wordnikKey apiKey = self.bot.credentials.wordnikKey
word = "-" word = "-"
while "-" in word: while "-" in word or "." in word:
with urllib.request.urlopen(apiUrl+apiKey) as p: with urllib.request.urlopen(apiUrl+apiKey) as p:
word = list(json.load(p)[0]["word"].upper()) word = list(json.load(p)[0]["word"].upper())
logThis("Found the word \""+"".join(word)+"\"") logThis("Found the word \""+"".join(word)+"\"")