| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
aiohttp seems to not set it during its state machine flow
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This should work both on Windows and on Linux.
Apparently these types of blips are considered normal for Discord. So
rather than letting the reconnect logic handler expect these to be
catastrophic, it should handle it specially so it doesn't waste an
IDENTIFY for what ultimately should just be a small networking blip.
This also makes it less noisy for the end-user as these complaints
happen from time to time.
|
| |
|
|
|
|
|
| |
These include:
* on_shard_resumed
* on_shard_connect
* on_shard_disconnect
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This is experimental and I'm unsure if it actually works
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This uses the nonce field to properly disambiguate queries. There's
also some redesigning going on behind the scenes and minor clean-up.
Originally I planned on working on this more to account for the more
widespread chunking changes planned for gateway v7 but I realized that
this would indiscriminately slow down everyone else who isn't planning
on working with intents for now.
I will work on the larger chunking changes in the future, should time
allow for it.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This also implements the heartbeating a bit more consistent to the
official Discord client.
|
| |
|
|
|
|
|
|
|
|
| |
This prevents our sessions from being invalidated by Discord which
caused a lot of failures when resuming. This caused an unnecessary
amount of IDENTIFYs to happen depending on the circumstances.
Closes #2631
See also discord/discord-api-docs#1472
|
| |
|
|
| |
It's too noisy
|
| |
|
|
| |
Closes #2510
|
| | |
|
| | |
|
| |
|
| |
See https://github.com/discordapp/discord-api-docs/pull/1244
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Probably not a significant difference but might as well use it here.
The basic idea is to cache the getattr calls instead of repeatedly
doing it (since they're around 105ns on my machine). The dictionary
lookup is about 41ns on my machine.
The next step in speeding up library code some more should be in
the parser bodies themselves but that's a problem to tackle another
day.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|