From 3806c7bcdd47c2323550a071590a31c5909804f0 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sat, 24 May 2025 23:28:25 -0400 Subject: [PATCH] Fixed logic of getting the online bots --- app/routers/nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routers/nodes.py b/app/routers/nodes.py index 218057e..363ad5e 100644 --- a/app/routers/nodes.py +++ b/app/routers/nodes.py @@ -119,6 +119,7 @@ async def leave(): async def get_online_bots(): active_bots = [] for client in current_app.active_clients: - active_bots.append(client.active_token.to_dict()) + if current_app.active_clients[client].active_token: + active_bots.append(current_app.active_clients[client].active_token.to_dict()) return jsonify(active_bots) \ No newline at end of file