Disable yt ratelimit if there are no tokens provided

This commit is contained in:
Choco
2025-05-14 09:37:33 +08:00
parent 4009832240
commit 8b81c05d98

View File

@@ -113,7 +113,7 @@ class Node:
self._players: Dict[int, Player] = {}
self._info: Optional[NodeInfo] = None
self.yt_ratelimit: Optional[YTRatelimit] = STRATEGY.get(yt_ratelimit.get("strategy"))(self, yt_ratelimit) if yt_ratelimit else None
self.yt_ratelimit: Optional[YTRatelimit] = STRATEGY.get(yt_ratelimit.get("strategy"))(self, yt_ratelimit) if yt_ratelimit and yt_ratelimit.get("tokens") else None
self._bot.add_listener(self._update_handler, "on_socket_response")