Commit Graph

12 Commits

Author SHA1 Message Date
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
2175bd51c0 Fix voice connection issues and upgrade to voice v8 2025-06-30 03:14:23 -04:00
42e4a87374 Fix typo in voice server update state handling 2025-02-08 21:05:21 -05:00
b0024dc866 Change line endings from CRLF to LF in voice_state.py 2024-05-16 18:48:48 -04:00
d53877f2cb Remove async_timeout requirement
It was causing some dependency issues
2024-05-16 18:48:21 -04:00
b8c29b0790 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
2024-04-18 03:36:18 -04:00
a9ff58724b Fix move_to related voice state bugs 2024-01-26 20:14:19 -05:00
9db0dadc42 Fix voice disconnect+connect race condition
Fixes a race condition when disconnecting and immediately connecting
again.  Also fixes disconnect() being called twice.

Let me be clear, I DO NOT LIKE THIS SOLUTION.  I think it's dumb but I
don't see any other reasonable alternative.  There isn't a way to
transfer state to a new connection state object and I can't think of a
nice way to do it either.  That said, waiting an arbitrary amount of
time for an arbitrary websocket event doesn't seem like the right
solution either, but it's the best I can do at this point.
2023-12-14 19:09:04 -05:00
c7edfc7c16 Future proof usage of async_timeout 2023-10-24 16:07:56 -04:00
e1aa6cc264 Fix bad voice state when moving to a voice channel without permissions 2023-10-01 17:45:55 -04:00
9f8f9bf56b Fix incorrect callback typing for WebsocketHook 2023-09-28 18:56:14 -04:00
44284ae107 Rewrite voice connection internals 2023-09-28 17:51:22 -04:00