diff --git a/app/routers/nodes.py b/app/routers/nodes.py index bb85164..218057e 100644 --- a/app/routers/nodes.py +++ b/app/routers/nodes.py @@ -112,4 +112,13 @@ async def leave(): return jsonify({"status": "command sent", "client_id": client_id, "command": NodeCommands.LEAVE}), 200 except Exception as e: - return jsonify({"error": f"Failed to send command: {e}"}), 500 \ No newline at end of file + return jsonify({"error": f"Failed to send command: {e}"}), 500 + + +@nodes_bp.route("/get_online_bots", methods=['GET']) +async def get_online_bots(): + active_bots = [] + for client in current_app.active_clients: + active_bots.append(client.active_token.to_dict()) + + return jsonify(active_bots) \ No newline at end of file