| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Add warnings for when the heartbeat is blocked for a long time and when
the websocket latency is excessively high. These indicate problems with
blocking the event loop and/or insufficient computing resources to keep
up with the demand.
|
| |
|
|
|
|
|
| |
- Update internals to be compatible with v4
- Adds multiple encryption mode support. Previously only `xsalsa20_poly1305` was supported. Now `xsalsa20_poly1305_suffix` is also supported.
Note: There is no (nice) way to manually select a mode. The user needn't worry about this however.
- Fixed speaking state bug. When you disconnected from a voice channel while a bot was playing, upon reconnect you would be unable to hear the bot. This was caused by bots not sending their speaking state while transmitting. Bots will now set their speaking state properly when transmitting.
Note: This does not account for sending actual silence, the speaking indicator will still be active.
|
| |
|
|
|
| |
Occured due to difficult to spot difference in git merge when rebasing
the lint changes.
|
| | |
|
| |
|
|
|
| |
This makes it so that _keep_alive is stopped no matter which closing
method is called
|
| |
|
|
|
| |
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
|
| |
|
|
|
| |
Convert log("fmt" % args) to log("fmt", args) as the latter is lazy and
does not do the formating if the string is never logged.
|
| |
|
|
|
| |
Remove redundant parenthisis around await expressions. Left over from
f25091ef.
|
| |
|
|
|
|
|
|
| |
Restrict the values accepted by comparisons with booleans to be actual
booleans.
Minor breaking of undocumented behaviour in permissions; the value to
set bits to must be booleans (as indicated by the type error thrown).
|
| |
|
|
|
| |
Use the more explicit (and common) exc instead of e as the variable
holding the exception in except handlers.
|
| |
|
|
| |
Add exception qualifier(s) to bare except clauses swallowing exceptions.
|
| |
|
|
|
|
| |
* type(x) is y is faster than isinstance(x, y)
* Re-arrange if-statements for common statements
* Drop handler getattr for most events that don't use it
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The method log of Logger has never been documented as being a part of
the standard logging module. It was renamed to warning when the module
was included in the standard library, but the old name was kept for
backward compatibility.
|
| |
|
|
| |
Adjust whitespace to be consistent with the rest of the library.
|
| |
|
|
| |
Left over from various refactoring and rewrites.
|
| |
|
|
| |
Increase of RAM and CPU doesn't give me much benefit I feel.
|
| | |
|
| | |
|
| |
|
|
| |
Fixes #1110
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a massive breaking change.
* All references to "game" have been renamed to "activity"
* Activity objects contain a majority of the rich presence information
* Game and Streaming are subtypes for memory optimisation purposes for
the more common cases.
* Introduce a more specialised read-only type, Spotify, for the
official Spotify integration to make it easier to use.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This time with less bugs. It turned out that the crash was due to a
synchronisation issue between the pending reads and the actual shard
polling mechanism.
Essentially the pending reads would be cancelled via a simple bool but
there would still be a pass left and thus we would have a single
pending read left before or after running the polling mechanism and
this would cause a race condition.
Now the pending read mechanism is properly waited for before returning
control back to the caller.
|
| |
|
|
| |
This reverts commit 462191a08b5b2efb83f5bc32935dc546d35a744b.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This should allow an easier way to query the Discord protocol gateway
latency, defined by the difference HEARTBEAT_ACK between and the last
sent HEARTBEAT.
|
| |
|
|
|
|
|
| |
This setting configures how long before a timeout event is emitted
internally and disconnects the websocket. Since some users were
experiencing issues with the gateway not responding, this should help
mitigate the issue for those with poor PCs.
|
| | |
|
| |
|
|
| |
Not sure how I missed these.
|
| |
|
|
|
| |
This would cause unnecessary format calls even if you didn't have
logging enabled.
|
| | |
|
| |
|
|
|
|
| |
Some people like to use that variable name apparently.
See #568 and #569.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a complete redesign of the old voice code.
A list of major changes is as follows:
* The voice websocket will now automatically reconnect with
exponential back-off just like the regular Client does.
* Removal of the stream player concept.
* Audio now gracefully pauses and resumes when a disconnect is found.
* Introduce a discord.AudioSource concept to abstract streams
* Flatten previous stream player functionality with the
VoiceClient, e.g. player.stop() is now voice_client.stop()
* With the above re-coupling this means you no longer have to
store players anywhere.
* The after function now requires a single parameter, the error,
if any existed. This will typically be None.
A lot of this design is experimental.
|
| |
|
|
|
|
| |
This shows the Shard ID in more places, along with a gateway trace and
session ID. Also helps show the RESUME/IDENTIFY/RESUMED/READY flow a
bit more instead of it looking like the connection has zombied out.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Apparently we should always try to RESUME first and if we get
INVALIDATE_SESSION then we should IDENTIFY instead. This is the
preferred way to do RESUMEs.
|
| |
|
|
| |
Should provide better support for uvloop.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This allows people to run their >2,500 guild bot in a single process
without the headaches of IPC/RPC or much difficulty.
|