aboutsummaryrefslogtreecommitdiff
path: root/discord/state.py
Commit message (Collapse)AuthorAgeFilesLines
* Code optimisations and refactoring via SourceryNadir Chowdhury2021-02-241-5/+4
|
* Use member provided data in typing_start event if not in cacheRapptz2021-01-241-0/+5
| | | | | | Apparently Discord had this all along. ref: #5965, #5983
* Change copyright year to presentNihaal Sangha2021-01-151-1/+1
|
* Dispatch user updates if the global cache gets stale in update eventsRapptz2021-01-071-0/+6
|
* Implement presences for `Guild.query_members`Nadir Chowdhury2020-12-311-6/+17
|
* remove extraneous assignmentSebastian Law2020-12-221-2/+0
|
* [chore] Remove redundant importsNadir Chowdhury2020-11-281-2/+0
| | | This also removes the historical patch for NullHandler implemented in bbf1c54, as it has been available since Python 3.1.
* Ensure member key is not overwritten by author key in MESSAGE_UPDATERapptz2020-11-231-0/+3
| | | | | | | This also coerces the older message to take the member data from the newer message so the types are not incompatible. Fix #5999
* Don't store a user cache if there's no member intent or cache is offRapptz2020-11-231-0/+6
| | | | | | | Without a cache or member intent the user cache can get out of date with no events to update the underlying user in the member object. Ref: #6034
* Fix error with templates not having access to member cache flags.Rapptz2020-11-211-6/+6
| | | | | | This also changes the attribute from having an underscore Fix #5986
* Fix error when querying members from the gateway.Rapptz2020-10-191-2/+1
| | | | I accidentally made this return True instead of the actual member list
* Allow concurrent calls to guild.chunk()Rapptz2020-10-191-23/+35
| | | | | | This allows people who write guild.chunk() calls in highly concurrent places such as on_message or checks to not spam the gateway with an actual request and instead waits for the pre-existing request to finish
* Load member from guild_member_update dispatchFlorian Spieß2020-10-171-0/+3
|
* Ensure our own member is never evicted from the cache in any policy.Rapptz2020-10-171-4/+5
|
* Fix attribute errors when timing out during chunking start-upRapptz2020-10-171-2/+2
|
* Add warning if guilds intent is disabled.Rapptz2020-09-281-0/+3
|
* Guard GUILD_MEMBER_ADD/GUILD_MEMBER_REMOVE from errorsRapptz2020-09-281-2/+11
| | | | | If the guilds intent is disabled all guilds are unavailable. This means we don't receive a member_count attribute and cannot update it.
* Add Client.intents to query the current intentsRapptz2020-09-261-0/+6
| | | | Closes #5854
* Make Intent class creation more intuitiveRapptz2020-09-241-1/+1
|
* Fix typo in ValueError messageapple502j2020-09-241-1/+1
|
* Add chunk_guilds_at_startup and deprecate fetch_offline_membersRapptz2020-09-241-5/+16
|
* Default MemberCacheFlags based on intentsRapptz2020-09-231-2/+2
|
* Pass default intents if not explicitly givenRapptz2020-09-231-0/+2
|
* Allow finer grained control over the member cache.Rapptz2020-09-231-6/+27
|
* Add Guild.chunk and deprecated Client.request_offline_membersRapptz2020-09-231-25/+32
|
* Fix timeouts due to hitting the gateway rate limitRapptz2020-09-231-2/+2
|
* Maximize the amount of concurrency while chunking.Rapptz2020-09-231-1/+13
| | | | | | In order to reduce our amount of backpressure we need to limit the amount of concurrent chunk requests we can have so the gateway buffer has some time to breathe.
* Speed up chunking for guilds with presence intent enabledRapptz2020-09-231-3/+8
|
* Maximize concurrency when chunking on AutoSharded clientsRapptz2020-09-231-21/+45
|
* All guilds require chunking if opting into itRapptz2020-09-231-6/+3
|
* Handle user updates within GUILD_MEMBER_UPDATERapptz2020-09-231-1/+5
|
* Rewrite chunking to work with intents.Rapptz2020-09-231-162/+77
| | | | | | | | This slows down chunking significantly for bots in a large number of guilds since it goes down from 75 guilds/request to 1 guild/request. However the logic was rewritten to fire the chunking request immediately after receiving the GUILD_CREATE rather than waiting for all the guilds in the ready stream before doing it.
* Change unknown cache log warnings from WARNING -> DEBUGRapptz2020-09-231-19/+19
|
* Add support for guild intentsRapptz2020-09-231-0/+8
|
* Implement VoiceProtocol lower level hooks.Rapptz2020-09-231-4/+10
| | | | | This allows changing the connect flow and taking control of it without relying on internal events or tricks.
* Update message references in AutoShardedConnectionStateRapptz2020-07-251-0/+23
| | | | Fixes #5133
* Add guild_ready_timeout to control the timeout of GUILD_CREATE streamRapptz2020-07-251-4/+8
| | | | | | | This also fixes a timing issue where READY would take far too long to load for big bot authors. Closes #4112
* Add shard related connection and resume events.Rapptz2020-07-251-0/+5
| | | | | | | These include: * on_shard_resumed * on_shard_connect * on_shard_disconnect
* Add before_identify_hook to have finer control over IDENTIFY syncingRapptz2020-07-251-1/+10
|
* Rewrite of AutoShardedClient to prevent overlapping identifyRapptz2020-07-251-0/+2
| | | | This is experimental and I'm unsure if it actually works
* Fix TypeError on missing shard_id kwargAnurag2020-06-071-2/+2
|
* Add user_ids fields for query_membersTarek2020-05-291-2/+2
|
* Fix TypeError in chunkerapple502j2020-05-231-1/+1
|
* state: use bytes.hex() instead of binascii.hexlify().decode()iomintz2020-05-101-2/+1
|
* Fix timeout issues with fetching members via query_membersRapptz2020-05-101-12/+25
| | | | | | | | | | | | 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.
* Decrement Guild.member_count even if member is not cachedRapptz2020-04-191-1/+1
| | | | Fix #4021
* Fix PartialEmoji.url.read for reactionsapple502j2020-04-181-1/+1
|
* Move log levels around to make INFO a little less noisyRapptz2020-04-061-3/+7
|
* animated key is never given to reaction_remove(_emoji)NCPlayz2020-04-061-3/+3
|
* Rename allowed mention parameters to allowed_mentionsRapptz2020-04-041-4/+4
|