mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Refactor loop code to allow usage of asyncio.run
This commit is contained in:
1 parent
196db33e9f
commit
93af158b0c
9 files changed
+44
-136
No files matched your search
@@ -222,8 +222,6 @@ class VoiceClient(VoiceProtocol):
|
||||
The endpoint we are connecting to.
|
||||
channel: Union[:class:`VoiceChannel`, :class:`StageChannel`]
|
||||
The voice channel connected to.
|
||||
loop: :class:`asyncio.AbstractEventLoop`
|
||||
The event loop that the voice client is running on.
|
||||
"""
|
||||
|
||||
channel: VocalGuildChannel
|
||||
@@ -405,7 +403,7 @@ class VoiceClient(VoiceProtocol):
|
||||
raise
|
||||
|
||||
if self._runner is MISSING:
|
||||
self._runner = self.loop.create_task(self.poll_voice_ws(reconnect))
|
||||
self._runner = self.client.loop.create_task(self.poll_voice_ws(reconnect))
|
||||
|
||||
async def potential_reconnect(self) -> bool:
|
||||
# Attempt to stop the player thread from playing early
|
||||
|
||||
Reference in new issue
Block a user