From f49472c6515f1770ddcf6fff9e702ad7cb33f86d Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Mon, 26 May 2025 00:23:37 -0400 Subject: [PATCH] Handle when active config is empty --- app/routers/bot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/routers/bot.py b/app/routers/bot.py index 7440be3..a6f8ef9 100644 --- a/app/routers/bot.py +++ b/app/routers/bot.py @@ -81,8 +81,11 @@ def find_token_in_active_clients(target_token: str) -> bool: True if the token is found in any ActiveClient, False otherwise. """ for client_id in current_app.active_clients: - if current_app.active_clients[client_id].active_token.token == target_token: - return True + try: + if current_app.active_clients[client_id].active_token.token == target_token: + return True + except Exception as e: + pass return False