txlyre 1 day ago
parent
commit
6ce9fd1b19
1 changed files with 7 additions and 3 deletions
  1. 7 3
      commands.py

+ 7 - 3
commands.py

@@ -707,10 +707,14 @@ async def chess_from_handler(chess, id, moves):
 
 
 async def chess_stop_handler(chess, id):
-    if await chess.end(id):
-        return ["Игра завершена."]
+    try:
+        stats = chess_game_stats(chess, id)
+    except KeyError:
+        return ["Нет активной игры."]
+
+    await chess.end(id)
 
-    return ["Нет активной игры."]
+    return ["Игра завершена.", stats]
 
 
 async def chess_move_handler(chess, id, move):