aboutsummaryrefslogtreecommitdiff
path: root/discord/shard.py
Commit message (Collapse)AuthorAgeFilesLines
* Add chunk_guilds_at_startup and deprecate fetch_offline_membersRapptz2020-09-241-4/+5
|
* Add a special exception for required privileged intentsRapptz2020-09-231-3/+17
|
* Add Guild.chunk and deprecated Client.request_offline_membersRapptz2020-09-231-1/+2
|
* Fix Client.request_offline_members no longer workingRapptz2020-09-231-4/+8
|
* Implement VoiceProtocol lower level hooks.Rapptz2020-09-231-0/+1
| | | | | This allows changing the connect flow and taking control of it without relying on internal events or tricks.
* Remove caching from AutoShardedClient.shardsRapptz2020-09-101-1/+1
|
* Terminate shard processing queue when a clean close is encountered.Rapptz2020-08-011-0/+4
| | | | Fix #5180
* Fix AttributeError from internal queue being double underscore.Rapptz2020-07-251-11/+11
|
* Add an exposed way to extract shard-specific information.Rapptz2020-07-251-11/+93
| | | | Closes #2654
* Propagate exceptions when an unhandled error happensRapptz2020-07-251-0/+17
|
* Handle Connection Reset by Peer connection errors.Rapptz2020-07-251-2/+8
| | | | | | | | | | | | 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.
* Add shard related connection and resume events.Rapptz2020-07-251-0/+2
| | | | | | | These include: * on_shard_resumed * on_shard_connect * on_shard_disconnect
* Handle connection errors during reidentify flow.Rapptz2020-07-251-5/+9
|
* Make every shard maintain its own reconnect loopRapptz2020-07-251-14/+70
| | | | | | | | | | | | Previously if a disconnect happened the client would get in a bad state and certain shards would be double sending due to unhandled exceptions raising back to Client.connect and causing all shards to be reconnected again. This new code overrides Client.connect to have more finer control and allow each individual shard to maintain its own reconnect loop and then serially request reconnection to ensure that IDENTIFYs are not overlapping.
* Add before_identify_hook to have finer control over IDENTIFY syncingRapptz2020-07-251-11/+6
|
* Fix READY not firing for multi-processed AutoShardedClient clustersRapptz2020-07-251-3/+2
|
* Use a proper type for the event queueRapptz2020-07-251-15/+28
|
* Rewrite gateway to use aiohttp instead of websocketsRapptz2020-07-251-21/+1
|
* Fix AttributeError on reconnectionRapptz2020-07-251-4/+4
|
* Rewrite of AutoShardedClient to prevent overlapping identifyRapptz2020-07-251-50/+53
| | | | This is experimental and I'm unsure if it actually works
* Fix timeout issues with fetching members via query_membersRapptz2020-05-101-25/+6
| | | | | | | | | | | | 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.
* Fix regression with Member.activities not clearingRapptz2020-04-041-2/+2
|
* Change default close code to 4000 instead of 1000.Rapptz2020-04-041-1/+1
| | | | | | | | | | 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
* Don't add None to Member.activities tuplejack11422020-04-041-1/+2
|
* Bump waiting time of GUILD_CREATE stream by number of shards waited.Rapptz2020-01-281-0/+1
| | | | | 2 seconds might be too short and cause it to finish waiting while other shards are still IDENTIFYing.
* Bump copyright year to 2020Rapptz2020-01-191-1/+1
| | | | Closes #2510
* Document BaseActivityRapptz2020-01-141-4/+0
|
* Expose _ActivityTag as BaseActivity to easily refer to.Rapptz2020-01-141-1/+1
|
* Fix more deprecation warningsRapptz2019-11-201-1/+1
|
* Fix all deprecation warnings for 3.8Rapptz2019-11-201-11/+11
|
* docs: Fix minor typoReece Dunham2019-06-121-1/+1
|
* Improve documentationNCPlayz2019-06-071-4/+4
|
* Use a dict instead of getattr for parsing events.Rapptz2019-05-291-0/+1
| | | | | | | | | | | 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.
* Use a regular boolean instead of asyncio.Event for close status.Rapptz2019-04-251-1/+1
|
* Fix oversight where on_disconnect did not get called on WS termination.Rapptz2019-04-081-0/+2
|
* Organise documentationNCPlayz2019-03-191-3/+3
|
* Bumped copyright years to 2019.Dante Dam2019-01-281-1/+1
|
* Add support for multiple activitiesSnowyLuma2018-11-241-1/+1
|
* [lint] Fix import orderHornwitser2018-11-241-5/+6
| | | | | Reorder imports to be consistenly grouped by standard library, third party library, and local modules in that order thoughout the library.
* [lint] Remove redundant paranthesisHornwitser2018-11-241-2/+2
| | | | | Remove redundant parenthisis around await expressions. Left over from f25091ef.
* [lint] Limit unneccessarily broad except clausesHornwitser2018-11-241-1/+1
| | | | Add exception qualifier(s) to bare except clauses swallowing exceptions.
* Don't try to close shards if there are none yet.Gorialis2018-09-261-1/+3
|
* Optimise tight loops in DiscordGateway.received_messageRapptz2018-09-241-1/+2
| | | | | | * 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
* Change docstrings to raw-stringsBeatButton2018-09-141-1/+1
|
* [lint] Fix incorrect and inconsistent whitespaceHornwitser2018-08-221-4/+2
| | | | Adjust whitespace to be consistent with the rest of the library.
* [lint] Remove unused variablesHornwitser2018-08-221-3/+3
| | | | Left over from various refactoring and rewrites.
* Disable compression for websockets.Rapptz2018-06-101-1/+1
| | | | Increase of RAM and CPU doesn't give me much benefit I feel.
* Remove dead package references.Rapptz2018-06-101-1/+1
|
* Drop support for Python 3.4 and make minimum version 3.5.2.Rapptz2018-06-101-54/+37
|
* Split Game object to separate Activity subtypes for Rich Presences.Rapptz2018-03-051-9/+15
| | | | | | | | | | | 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.