Skip to content
Permalink
Browse files
Check if getCategories returned an error
  • Loading branch information
mateussa committed Nov 2, 2017
1 parent 6264e00 commit bcf784ccf24a839b2f6c693c4b4454ebc18df597
Showing 1 changed file with 5 additions and 0 deletions.
@@ -81,6 +81,11 @@ def askSomething(answerType, sendMessages, noAnswers, defaultAnswer):
def qChallenge():
''' Question challenge, test user knowledge with some questions '''
cat = getCategories(True, 3)
if ("Error" in cat):
sendMessage(cat[1], False)
sendMessage("Lets try again.")
return (True)

receivedMessage = askSomething(0, ["Pick a subject.", cat[0], cat[1], cat[2]],
["You can choose a category from the list above, like 'Music'.",
"Hmmm, I see you are afraid of making a mistake."], "")

0 comments on commit bcf784c

Please sign in to comment.