🥅 Error codes

This commit is contained in:
NikolajDanger
2020-07-29 12:14:30 +02:00
parent ef434ecee8
commit b991ac0385
10 changed files with 489 additions and 280 deletions

View File

@ -40,8 +40,8 @@ def giveMoney(user,targetUser,amount):
addMoney(targetUser,amount)
return "Transferred "+str(amount)+" GwendoBucks to "+user
else:
logThis("They didn't have enough GwendoBucks")
return "You don't have that many GwendoBucks"
logThis("They didn't have enough GwendoBucks (error code 1223b)")
return "You don't have that many GwendoBucks (error code 1223b)"
else:
logThis("They didn't have enough GwendoBucks")
return "You don't have that many GwendoBucks"
logThis("They didn't have enough GwendoBucks (error code 1223a)")
return "You don't have that many GwendoBucks (error code 1223a)"

View File

@ -43,8 +43,8 @@ def triviaStart(channel : str):
return question, answers, correctAnswer
else:
logThis("There was already a trivia question for that channel")
return "There's already a trivia question going on. Try again in like, a minute", "", ""
logThis("There was already a trivia question for that channel (error code 1106)")
return "There's already a trivia question going on. Try again in like, a minute (error code 1106)", "", ""
# Lets players answer a trivia question
def triviaAnswer(user : str, channel : str, command : str):
@ -63,11 +63,14 @@ def triviaAnswer(user : str, channel : str, command : str):
return "Locked in "+user+"'s answer"
else:
return user+" has already answered this question"
logThis(user+" has already answered this question (error code 1105)")
return user+" has already answered this question (error code 1105)"
else:
return "There's no question right now"
logThis("There's no question right now (error code 1104)")
return "There's no question right now (error code 1104)"
else:
return "I didn't quite understand that"
logThis("I didn't quite understand that (error code 1103)")
return "I didn't quite understand that (error code 1103)"
# Adds 1 GwendoBuck to each player that got the question right and deletes question from games.json.
@ -84,6 +87,6 @@ def triviaCountPoints(channel : str):
else:
logThis("Couldn't find the question")
logThis("Couldn't find the question (error code 1102)")
return None