* 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
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.
Every thread now has a name and either a contextually relevant
identifier or their in hex to disambiguate multiple threads of the same
type. Also finally gets rid of that old python 2 style init call.
Since apparently closing stdin and later calling communicate() is no bueno,
we're just going to rearrange the process finalization code so both cleanup()
and the pipe loop exit conditions point to it.
Due to an oversight that has existed since the very beginning, the pipe
argument has been broken since there was nothing to actually write
the data to the process's stdin. Now there is.
Also josh made me add typings blegh
Add stream option and command so we don't always have to download a file
Move repeated voice check code to before_invoke hook
Add typing indicators when making YTDLSources
`keep_alive` was not defined until it was created in `received_message`, `ws` is `None` until its actually connected, which doesn't always happen. If an error happens before things start up properly, the client should now clean its objects up (fixes `unclosed client session` warning).