mirror of
https://gitlab.jonasled.de/jonasled/discordbot
synced 2024-11-16 06:52:17 +01:00
if char not in a-z print it direct
This commit is contained in:
parent
fd90459c83
commit
ede6851219
2 changed files with 6 additions and 0 deletions
3
bot.py
3
bot.py
|
@ -105,6 +105,9 @@ async def on_message(message): # this will run on every message
|
||||||
wordTemp = word
|
wordTemp = word
|
||||||
for letters in right.split(";"):
|
for letters in right.split(";"):
|
||||||
wordTemp = wordTemp.replace(letters, "")
|
wordTemp = wordTemp.replace(letters, "")
|
||||||
|
for letters in list(wordTemp):
|
||||||
|
if not letters in "abcdefghijklmnopqrstuvwxyz":
|
||||||
|
wordTemp = wordTemp.replace(letters)
|
||||||
|
|
||||||
print(len(wrong.split(";")))
|
print(len(wrong.split(";")))
|
||||||
if(wordTemp == ""):
|
if(wordTemp == ""):
|
||||||
|
|
|
@ -58,6 +58,9 @@ def generateHangmanMessage(word, right, wrong):
|
||||||
for letter in word:
|
for letter in word:
|
||||||
if(letter in right):
|
if(letter in right):
|
||||||
message = message + letter + " "
|
message = message + letter + " "
|
||||||
|
elif not letter in "abcdefghijklmnopqrstuvwxyz":
|
||||||
|
message = message + letter + " "
|
||||||
|
|
||||||
else:
|
else:
|
||||||
message = message + "_ "
|
message = message + "_ "
|
||||||
return message[:-1] + "`"
|
return message[:-1] + "`"
|
Loading…
Reference in a new issue