From 59034d8f5ae5136878e159fa15e2031979579f0c Mon Sep 17 00:00:00 2001 From: Choco <94597336+ChocoMeow@users.noreply.github.com> Date: Sat, 22 Feb 2025 12:35:24 +0800 Subject: [PATCH] Prevent usage of active token --- voicelink/ratelimit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voicelink/ratelimit.py b/voicelink/ratelimit.py index 35d7bf2..171a512 100644 --- a/voicelink/ratelimit.py +++ b/voicelink/ratelimit.py @@ -70,7 +70,7 @@ class YTRatelimit(ABC): If a new token is found, update it via the node and return it. """ for token in self.tokens: - if not token.is_flagged or token.allow_retry: + if token != self.active_token and (not token.is_flagged or token.allow_retry): try: await self.node.update_refresh_yt_access_token(token) self.active_token = token