Jakub Kuczys
b5dc9e54a0
Change VoiceProtocol user callbacks to be pos-only
2022-09-15 19:30:43 -04:00
Rapptz
3802780f77
Change a lot of logging INFO calls to be less verbose
...
Some of the logs were only useful for debug scenarios, so they have
been downgraded to DEBUG. Others were in INFO but supposed to be in
WARNING so those were upgraded.
2022-08-15 10:21:36 -04:00
Harshal Laheri
20d3871290
Add return type hint for some functions
2022-07-15 00:15:42 -04:00
apple502j
b95db674c0
Fix some typos
2022-06-27 22:34:45 -04:00
mniip
1be36c9c3e
Change View, Modal, and AudioPlayer to use logger instead of stderr
2022-06-22 02:10:02 -04:00
Rapptz
4c74523794
Fix versionadded docstrings in voice connect methods
2022-05-27 04:15:23 -04:00
Rapptz
cf031f71b9
Add a new extlink for discord documentation
2022-05-27 04:05:01 -04:00
Vaskel
89b9f1616c
Add self_deaf and self_mute params to voice connect methods
2022-04-14 19:06:22 -04:00
jack1142
5ffa3e85de
Update comments after # type: ignore
to be compatible with PEP 484
2022-03-27 22:26:34 -04:00
Rapptz
1192d842e1
Fix some type checker errors and remove some type ignores
...
Caught from an upgraded Pyright
2022-03-16 01:46:58 -04:00
Stocker
5aa696ccfa
Fix typing issues and improve typing completeness across the library
...
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-03-13 23:52:10 -04:00
Han Seung Min - 한승민
93af158b0c
Refactor loop code to allow usage of asyncio.run
2022-03-13 04:54:14 -04:00
Rapptz
0c690bc949
Fix audio not sending
...
Fixes #7531
2022-03-08 01:18:32 -05:00
Josh
a315786869
Handle type-errors in upcoming pyright release
2022-02-22 08:51:11 -05:00
Rapptz
3e90664cf9
Fix signature for VoiceClient
2022-02-22 04:09:48 -05:00
Josh
c8064ba6f2
Type-hint gateway
2022-02-22 03:59:58 -05:00
Josh
70b577e94b
Fix typing in voice related files
2022-02-22 02:37:22 -05:00
Rapptz
88b520b5ab
Reformat code using black
...
Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
2022-02-20 08:04:58 -05:00
Rapptz
ea2d972666
Make global log variable in modules private
2021-08-22 02:33:51 -04:00
Josh
f40f80c0dc
Fix typo in voice_client.py
2021-07-04 19:14:07 -04:00
scrazzz
3c5c5fc274
Update documentation in voice_client.py
2021-06-28 03:10:33 -04:00
Josh
5acea453cc
Type-hint voice_client / player
2021-06-28 00:59:14 -04:00
Nadir Chowdhury
757cfad38f
Type up **kwargs of various methods
2021-05-10 20:24:48 -04:00
Josh
3864fb37a0
Fix various reference issues in documentation
...
Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
2021-05-06 07:51:07 -04:00
Cryptex
8d74fad474
Update lavalink's repo url
2021-04-18 23:12:05 -04:00
Nadir Chowdhury
89456022cf
Add __all__
to remaining modules
2021-04-07 02:30:32 -04:00
Rapptz
9d39b135f4
Modernize code to use f-strings
...
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
Nihaal Sangha
69bdc3a184
Change copyright year to present
2021-01-15 05:28:11 -05:00
Rapptz
52865dfa99
Clear the connected flag when potentially reconnecting the player
...
Fix #5953
2020-11-21 22:53:04 -05:00
Rapptz
b76b5b42c0
Fix attribute error during rapid disconnects in VoiceClient.
...
Fix #6039
2020-11-21 22:47:04 -05:00
Rapptz
21ed9f61d2
Fix disconnect when trying to move to another voice channel.
...
Not overly proud of this implementation but this allows the library
to differentiate between a 4014 that means "move to another channel" or
"move nowhere". Sometimes the VOICE_STATE_UPDATE comes before the
actual websocket disconnect so special care had to be taken in that
case.
Fix #5904
2020-10-17 22:01:57 -04:00
Rapptz
9036b9651b
Properly handle disconnects in voice when force disconnected
2020-09-23 03:20:35 -04:00
Josh
9830e0ed8a
Fix issues with VoiceProtocol docstrsings.
2020-09-23 03:20:35 -04:00
Rapptz
e3922e24d9
Correct some protocol errors in v4 of voice gateway
2020-09-23 03:20:35 -04:00
Rapptz
0b93fa3a82
Implement VoiceProtocol lower level hooks.
...
This allows changing the connect flow and taking control of it without
relying on internal events or tricks.
2020-09-23 03:20:35 -04:00
Rapptz
250f29989b
Be defensive in case Discord breaks something with WS URLs again
2020-08-05 08:35:43 -04:00
Rapptz
a9824ffabf
Fix endpoint strings with :443 instead of :80
...
Fix #5191
Close #5188
2020-08-05 04:21:27 -04:00
Tsumiki
5cbbbca193
Add versionadded to VoiceClient latency and average_latency
2020-06-26 22:57:32 -04:00
Jeffrey
4078d64520
Fix reconnecting loop due to failed handshake on region change
2020-06-22 04:00:40 -04:00
매리
ddfed5a610
Change _handshaking variable when handshake terminate
2020-05-23 21:56:40 -04:00
Fwf
fa34d357a1
Added VoiceClient.latency and VoiceClient.average_latency
...
This also implements the heartbeating a bit more consistent to the
official Discord client.
2020-04-04 03:00:27 -04:00
Rapptz
6071607176
Bump copyright year to 2020
...
Closes #2510
2020-01-19 20:03:00 -05:00
Matt Carey
bcbfc354cf
Add support for xsalsa20_poly1305_lite
2019-12-17 00:11:40 -05:00
Imayhaveborkedit
839afce178
Print exception tracebacks in voice threads
...
Errors occurring within `AudioSource.read()` and `after()` functions will now display their tracebacks as if they were unhandled exceptions.
2019-11-26 05:16:53 -05:00
Rapptz
a6f61dcbde
Fix all deprecation warnings for 3.8
2019-11-20 02:30:19 -05:00
Imayhaveborkedit
fedf26bf3e
Add FFmpegOpusAudio and other voice improvements
...
Rework FFmpeg player and add FFmpegOpusAudio
I have extracted some of the base FFmpeg source code into its own
base class and reimplemented the PCM and the new Opus variants.
Support avconv probing
Also fix a few things
Update `__all__`
Fix the bugs
Rework probe functions and add factory function
Probing involves subprocess so it has been reworked into an async
factory function.
Add docs + a few tweaks
* Removed unnecessary read() and is_opus() functions from FFmpegAudio
* Clear self._stdout in cleanup()
* Add 20 second process communication timeout to probe functions
* Capped probe function bitrate values at 512
Change AudioPlayer to use more accurate, monotonic time.perf_counter()
Add lazy opus loading
The library now no longer loads libopus on import, only on
opus.Encoder creation or manually.
Fix review nits
2019-07-22 20:46:40 -04:00
NCPlayz
3c9bcc2851
Improve documentation
2019-06-07 19:27:46 -04:00
Rapptz
abb9c067cc
Add log line to show if we disconnected normally.
2019-05-01 02:49:52 -04:00
Imayhaveborkedit
7eb8417883
Fix voice handshake race condition
...
In the event that two voice_server_updates are received in a short time frame, the second one is now ignored.
2019-04-10 00:55:52 -04:00
Daniel
3a36f78e08
Use is_connected() instead of _connected in checks
...
Was doing a falsy check on an Event object instead of using the (unused) is_connected() function.
2019-04-09 00:14:41 -04:00