From 0bfd5a72a0a94091a6e20c3d7f71b77de10e9b60 Mon Sep 17 00:00:00 2001 From: imp <106537315+imptype@users.noreply.github.com> Date: Tue, 2 Sep 2025 17:27:24 +0100 Subject: [PATCH] Use future instead of event --- discord/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/http.py b/discord/http.py index e2b10212b..480d22706 100644 --- a/discord/http.py +++ b/discord/http.py @@ -502,8 +502,8 @@ class Ratelimit: async def release(self): if not self.one_shot: self.outgoing -= 1 - self._event.set() - self._event.clear() + if self._future and not self._future.done(): + self._future.set_result(None) async def __aenter__(self) -> Self: await self.acquire()