@@ -70,7 +70,10 @@ def __init__(self, chatbot: SugaroidBot):
70
70
try :
71
71
self .game_instance = self .aki .start_game ("en" )
72
72
except (AkiServerDown , AkiTechnicalError ):
73
- self .game_instance = self .aki .start_game ("en3" )
73
+ try :
74
+ self .game_instance = self .aki .start_game ("en3" )
75
+ except (AkiServerDown , AkiTechnicalError ):
76
+ self .game_instance = None
74
77
75
78
def start_game (self ):
76
79
# We are about to start the game. Lets send a fascinating entry
@@ -170,9 +173,13 @@ def process(
170
173
random_response (HOPE_GAME_WAS_GOOD )
171
174
)
172
175
elif not self .chatbot .globals ["akinator" ]["enabled" ]:
173
- self .chatbot .globals ["akinator" ]["class" ] = SugaroidAkinator (self .chatbot )
174
- response = self .chatbot .globals ["akinator" ]["class" ].start_game ()
175
- response += "<sugaroid:yesno>"
176
+ sugaroid_akinator_instance = SugaroidAkinator (self .chatbot )
177
+ if sugaroid_akinator_instance .game_instance is None :
178
+ response = "Sorry dude. Better luck next time. I am feeling sleepy for a game. 🥱"
179
+ else :
180
+ self .chatbot .globals ["akinator" ]["class" ] = sugaroid_akinator_instance
181
+ response = self .chatbot .globals ["akinator" ]["class" ].start_game ()
182
+ response += "<sugaroid:yesno>"
176
183
else :
177
184
if not self .chatbot .globals ["akinator" ]["class" ].game_over ():
178
185
response = self .chatbot .globals ["akinator" ]["class" ].progression (
0 commit comments