aboutsummaryrefslogtreecommitdiff
path: root/discord/state.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typing for private channel by user lookupRapptz2021-08-221-2/+2
|
* Make global log variable in modules privateRapptz2021-08-221-47/+47
|
* Reformat state.pyRapptz2021-08-211-51/+86
|
* Don't clear views in READYRapptz2021-08-211-3/+5
|
* Typehint state.pyStocker2021-08-211-177/+234
|
* Fix on_typing not dispatching for threadsRapptz2021-08-201-1/+1
|
* Partially type-hint state.pyRapptz2021-08-181-19/+25
| | | | | This is just work to get started. A more complete type hint will come later.
* Undo coercion of partial DMChannel to PartialMessageableRapptz2021-08-101-1/+1
|
* Add support for PartialMessageable instancesRapptz2021-08-101-2/+2
| | | | | This allows library users to send messages to channels without fetching it first.
* Cast removed thread member IDs to intRapptz2021-07-311-1/+1
|
* FIx on_thread_member_remove passing in NoneRapptz2021-07-311-1/+2
|
* Fix on_thread_member_remove not dispatchingRapptz2021-07-311-1/+1
|
* implement guild stickersNadir Chowdhury2021-07-301-0/+29
|
* Fix user cache acting incorrectly with evictionsRapptz2021-07-291-2/+2
| | | | | | | | | | | | | | The first issue involved copied users which would lead to user updates causing faster evictions of the cache than was expected. The second issue involved users that weren't bound to an internal lifetime eviction policy. These users would not get evicted. For example, a user without mutual guilds or being part of the internal cache in general (messages, DMs) would never end up being evicted for some strange reason. To handle this case, store_user would get a counterpart named create_user which would create a user without potentially storing them in the cache. That way only users with a bound lifetime within the library would be stored.
* Refactor utcfromtimestamp to use fromtimestamp(..., tz=utc)Rapptz2021-07-091-2/+1
|
* Change WEBHOOK_UPDATE to use guild information from gatewayRapptz2021-07-081-1/+6
| | | | | | This changes the lookup from unnecessary O(n) to two amortised O(1) lookups. This event pretty much always has a guild_id so the original code was always a performance bottleneck.
* Change CHANNEL_PINS_UPDATE to use guild information from gatewayRapptz2021-07-081-7/+9
| | | | This changes the channel lookup from O(n) to two amortised O(1) lookups
* Remove calls to gc.collect in ConnectionStateRapptz2021-07-071-18/+0
| | | | | For some bots this was actually a performance bottleneck, might as well remove it if it causes bad performance
* Move global user storage from WeakValueDictionary to dictRapptz2021-07-071-5/+26
| | | | | | | | | | | | Profiling showed that WeakValueDictionary caused rather significant and noticeable slowdowns during startup. Since the only thing it was used for was to automatically remove the key from the mapping when the reference count reaches zero, the same could theoretically be accomplished by using the __del__ special method. There is a chance that this could lead to a memory leak since the __del__ method is not always called, but the only instances of this happening are during interpreter shutdown to my knowledge and at that point the mapping is the least of my concern.
* Separate member_update and presence_update eventsRapptz2021-07-041-1/+1
|
* Fix Client.fetch_channel not returning ThreadAlex Nørgaard2021-07-031-2/+2
|
* Fix Interaction.channel being None in threadsNadir Chowdhury2021-07-011-3/+3
|
* Set Message.guild from guild_id if unavailable through Message.channelLilly Rose Berner2021-06-281-1/+1
|
* Dispatch thread_join when a thread is updated but not in cacheRapptz2021-06-281-0/+4
|
* Refactor Guild to support type hintsRapptz2021-06-081-0/+1
| | | | | | | | | | | | This patch also does the following: * Sets some parameters to be positional only * Changes Guild.edit to use the MISSING sentinel * Changes the various create_channel methods to be type safe * Changes many parameters from Optional[T] to use MISSING * Changes Guild.create_role to use MISSING sentinel This refactor is mostly partial but lays a decent foundation
* Allow pins events to work with threadsRapptz2021-06-081-1/+1
|
* Don't dispatch thread_join on extraneous THREAD_CREATE dispatchesRapptz2021-06-081-2/+4
|
* Parse remaining thread events.Rapptz2021-06-081-5/+50
|
* Add minor parsing for THREAD_LIST_SYNC and THREAD_MEMBER_UPDATERapptz2021-06-081-3/+46
| | | | There's no dispatch for these yet
* Allow Message.channel to be a threadRapptz2021-06-081-2/+2
|
* First pass at preliminary thread supportRapptz2021-06-081-1/+40
| | | | | This is missing a lot of functionality right now, such as two gateway events and all the HTTP CRUD endpoints.
* Add support for integration create/update/delete eventsNadir Chowdhury2021-06-071-0/+30
|
* Add Client.persistent_views to get all persistent viewsRapptz2021-05-311-0/+4
|
* Remove view syncing before editing in viewsRapptz2021-05-311-0/+3
| | | | | This prevents a potential race condition when a MESSAGE_UPDATE is received syncing and refreshing the view components causing a desync.
* Implement StageInstanceNadir Chowdhury2021-05-301-0/+35
|
* Add support for select componentsRapptz2021-05-281-1/+1
|
* Add initial support for buttons and componentsRapptz2021-05-271-0/+13
|
* Add support for ApplicationFlagsNadir Chowdhury2021-04-181-1/+3
|
* Fix guild.chunk() not working on evicted guildsSteve C2021-04-141-0/+3
| | | | If you're trying to chunk a guild that the bot is not in, it'll just hang on the chunk coro forever. It's weird, I know.
* Remove fetch_offline_members param for Clientapple502j2021-04-141-9/+1
|
* Remove support for guild subscriptions apple502j2021-04-141-1/+0
|
* Remove superfluous unused payload parameterRapptz2021-04-111-1/+1
|
* Create temporary DMChannels from message create eventsRapptz2021-04-111-3/+3
| | | | | | | | | | This allows for DMChannels to work without falling back to the Object error case since there is enough information to build a pseudo DMChannel object. This is a breaking change since it changes the type of DMChannel.recipient to Optional[User] for when this faux object is created.
* Remove `private_channel_(delete/create)` eventsNadir Chowdhury2021-04-111-22/+8
|
* Remove Member related handling in PRESENCE_UPDATERapptz2021-04-111-10/+6
|
* First pass at supporting v8 APIRapptz2021-04-111-6/+0
|
* Fix some regressions from create_task changeRapptz2021-04-061-1/+1
|
* Add on_interaction event and Interaction class.Rapptz2021-04-061-0/+5
| | | | | This is the first pass at the functionality. It's currently a bit incomplete.
* Add support for setting application_idRapptz2021-04-061-0/+17
|
* Use `asyncio.create_task` over `asyncio.ensure_future`Nadir Chowdhury2021-04-051-6/+6
|