From b79bc266a55348311dd73e1895bad33731d0568e Mon Sep 17 00:00:00 2001 From: Revnoplex <62947003+Revnoplex@users.noreply.github.com> Date: Sun, 20 Oct 2024 23:05:28 +1100 Subject: [PATCH] Set event loop in HTTPClient --- discord/http.py | 1 + 1 file changed, 1 insertion(+) diff --git a/discord/http.py b/discord/http.py index b7a86b107c..73a1b6944a 100644 --- a/discord/http.py +++ b/discord/http.py @@ -175,6 +175,7 @@ def __init__( self.loop: asyncio.AbstractEventLoop = ( asyncio.new_event_loop() if loop is None else loop ) + asyncio.set_event_loop(self.loop) self.connector = connector self.__session: aiohttp.ClientSession = MISSING # filled in static_login self._locks: weakref.WeakValueDictionary = weakref.WeakValueDictionary()