mirror of
https://github.com/zoffline/zwift-offline.git
synced 2026-06-12 11:01:32 -07:00
Update to Python 3.14
asyncio.get_event_loop() no longer creates a new event loop if one is not already running. Resolves #512
This commit is contained in:
+2
-1
@@ -57,7 +57,6 @@ class DiscordThread(threading.Thread):
|
||||
self.intents = discord.Intents.default()
|
||||
self.intents.members = True
|
||||
self.intents.message_content = True
|
||||
self.loop = asyncio.get_event_loop()
|
||||
self.start()
|
||||
|
||||
async def starter(self):
|
||||
@@ -65,6 +64,8 @@ class DiscordThread(threading.Thread):
|
||||
await self.discord_bot.start(self.token)
|
||||
|
||||
def run(self):
|
||||
self.loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(self.loop)
|
||||
try:
|
||||
self.loop.run_until_complete(self.starter())
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user