Added new node route to get online bots

This commit is contained in:
Logan Cusano
2025-05-24 23:24:18 -04:00
parent fbd0e65019
commit 4a61bd195f

View File

@@ -113,3 +113,12 @@ async def leave():
except Exception as e:
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)