mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
More voice fixes
* More voice fixes * Start socket reader paused and wait for socket creation * Fix issues handling 4014 closures Fixes code not handling disconnects from discord's end properly. The 4014 code is shared between being disconnected and moved, so it has to account for the uncertainty. Also properly stops the voice_client audio player when disconnecting. * Fix sending (dropped) silence packets when not connected
This commit is contained in:
@ -763,7 +763,8 @@ class AudioPlayer(threading.Thread):
|
||||
delay = max(0, self.DELAY + (next_time - time.perf_counter()))
|
||||
time.sleep(delay)
|
||||
|
||||
self.send_silence()
|
||||
if client.is_connected():
|
||||
self.send_silence()
|
||||
|
||||
def run(self) -> None:
|
||||
try:
|
||||
|
Reference in New Issue
Block a user