diff --git a/app/routers/bot.py b/app/routers/bot.py index 83edc42..9b330e9 100644 --- a/app/routers/bot.py +++ b/app/routers/bot.py @@ -188,10 +188,9 @@ async def delete_discord_token(discord_id_param: str): def find_token_in_active_clients(target_token: str) -> bool: """ - Checks if a target_token exists in the active_token of any ActiveClient object in a list. + Checks if a target_token exists in the active_token of any online ActiveClient object. Args: - clients: A list of ActiveClient objects. target_token: The token string to search for. Returns: @@ -199,7 +198,7 @@ def find_token_in_active_clients(target_token: str) -> bool: """ for client_id in current_app.active_clients: try: - if current_app.active_clients[client_id].active_token == target_token: + if current_app.active_clients[client_id].active_token.token == target_token: return True except Exception as e: pass