generated from mwc/lab_riddles
Finished the code it should work now
This commit is contained in:
2
api.py
2
api.py
@@ -49,7 +49,7 @@ class RiddleAPI:
|
||||
riddles = self.get_all_riddles()
|
||||
if len(riddles) == 0:
|
||||
raise APIError(["Sorry, there are no riddles on the server!"])
|
||||
return random.choice(riddles)
|
||||
return choice(riddles)
|
||||
|
||||
|
||||
def add_riddle(self, question, answer):
|
||||
|
||||
Reference in New Issue
Block a user