Commit Graph
394 Commits
Author SHA1 Message Date
Lilly Rose Berner 6e2cfff2ac Add raw member remove event 2022-04-27 22:08:04 -04:00
Lilly Rose Berner 5a06fa5f3e Give large guilds more time to chunk before timing out 2022-04-25 13:00:14 -04:00
Lilly Rose Berner 2dbf14bb72 Separately delay ready event for each shard 2022-04-25 02:01:46 -04:00
Lilly Rose Berner 277d35c9b2 Add raw typing event and fix typing event not working for DMs 2022-04-23 22:25:07 -04:00
Lilly Rose Berner 3e8fa5a661 Add raw thread delete event 2022-04-22 00:42:39 -04:00
Rapptz 6a49dfcc0f Fix crash with WEBHOOKS_UPDATE channel_id being nullable 2022-04-10 03:47:03 -04:00
Rapptz 23f6876492 Add initial support for forum channels
Closes #7652
2022-04-06 23:02:58 -04:00
Josh deb7958797 Add new on_thread_create event 2022-04-04 07:22:21 -04:00
Rapptz 2aca705b95 Add support for sending messages and managing webhooks in VoiceChannel 2022-04-02 11:14:03 -04:00
jack1142 5ffa3e85de Update comments after # type: ignore to be compatible with PEP 484 2022-03-27 22:26:34 -04:00
Rapptz 1192d842e1 Fix some type checker errors and remove some type ignores
Caught from an upgraded Pyright
2022-03-16 01:46:58 -04:00
5aa696ccfa Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-03-13 23:52:10 -04:00
Rapptz 9c61e10a55 Move all async object creation to a proper initialisation point
This should make it so no object is created with another loop
2022-03-13 08:33:25 -04:00
Rapptz 8d4f08a5e7 Fix AutoShardedClient to work with the new asyncio loop machinery
Fix #7675
2022-03-13 08:05:44 -04:00
Han Seung Min - 한승민 93af158b0c Refactor loop code to allow usage of asyncio.run 2022-03-13 04:54:14 -04:00
Willy f09f0ea8ca Fix addition TypeError with Guild.member_count 2022-03-10 17:44:42 -05:00
z03h 3300f12dbb Fix scheduled event dispatch arguments 2022-03-09 20:07:22 -05:00
I. Ahmad 0db7b22713 Fix archived threads not getting evicted
Fixes #7541
2022-03-08 21:16:46 -05:00
Rapptz 987e27dfce Revert all Guild.chunk changes
This method should *not* return a list of members due to the way it is
used internally.
2022-03-07 22:14:38 -05:00
Rapptz ac0e4fabb8 Fix type checker error in Guild.chunk 2022-03-07 18:09:23 -05:00
Rapptz 4c8b1f9abd Remove unused imports 2022-03-05 21:40:42 -05:00
Rapptz f7315573aa Remove generic from Interaction and ConnectionState
This results in poor ergonomics due to the lack of default generics
for the common case. For most users this ends up in a degraded
experience since the type will resolve to Unknown rather than at the
very least a Client.
2022-03-05 05:03:23 -05:00
Rapptz f435d160dd Add Interaction.client property 2022-03-01 08:11:22 -05:00
Josh 147948af9b Use typing.Self throughout library 2022-03-01 07:53:24 -05:00
Rapptz ae1aaac5a7 Add support for autocomplete 2022-03-01 05:42:44 -05:00
Rapptz 0d2db90028 Implement slash commands 2022-03-01 05:35:29 -05:00
Nadir Chowdhury 3c6279b947 Implement Guild Scheduled Events 2022-03-01 01:00:04 -05:00
Rapptz 8d52ddaff6 Fix remaining type errors in main package
This doesn't fix the type errors in the ext packages though.
2022-02-22 04:19:46 -05:00
Josh 285069de08 Fix types in guild.py 2022-02-22 04:00:46 -05:00
Rapptz 24b729ed0d Fix up some type ignores in state.py 2022-02-21 22:28:32 -05:00
Nadir Chowdhury 3cf000d467 Type up gateway payloads 2022-02-21 22:09:40 -05:00
Rapptz 88b520b5ab Reformat code using black
Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
2022-02-20 08:04:58 -05:00
Josh 19c6687b55 Add support for Modal Interactions 2022-02-20 04:57:44 -05:00
Alex Nørgaard 2e5da07180 Fix unknown DMChannel in MessageReference.resolved.channel
Threads would cause the message reference to resolve to a DMChannel
2022-02-18 20:26:13 -05:00
Rapptz 940bdb988a Revert "Move global user storage from WeakValueDictionary to dict"
This reverts commit cb2363f0fd.

This lead to memory leaks due to insufficient tracking, assuming that
the members intent was enabled.
2022-02-17 07:26:10 -05:00
Rapptz d17551f51f Fix typing for private channel by user lookup 2021-08-22 07:36:39 -04:00
Rapptz ea2d972666 Make global log variable in modules private 2021-08-22 02:33:51 -04:00
Rapptz 311eac97b0 Reformat state.py 2021-08-21 14:48:22 -04:00
Rapptz d5033b04a2 Don't clear views in READY 2021-08-21 14:47:08 -04:00
Stocker 7592300535 Typehint state.py 2021-08-21 14:39:02 -04:00
Rapptz fbc4a51c35 Fix on_typing not dispatching for threads 2021-08-20 20:09:18 -04:00
Rapptz 0df3f51a0b Partially type-hint state.py
This is just work to get started. A more complete type hint will come
later.
2021-08-18 01:52:24 -04:00
Rapptz dc9c224b54 Undo coercion of partial DMChannel to PartialMessageable 2021-08-10 22:10:45 -04:00
Rapptz 1279510194 Add support for PartialMessageable instances
This allows library users to send messages to channels without fetching
it first.
2021-08-10 09:24:49 -04:00
Rapptz 2de0398d66 Cast removed thread member IDs to int 2021-07-31 20:22:51 -04:00
Rapptz 2cb5ce981e FIx on_thread_member_remove passing in None 2021-07-31 19:43:05 -04:00
Rapptz 41f3998a08 Fix on_thread_member_remove not dispatching 2021-07-31 19:40:47 -04:00
Nadir Chowdhury 60d82cf908 implement guild stickers 2021-07-30 21:25:41 -04:00
Rapptz ecf239d2a2 Fix user cache acting incorrectly with evictions
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.
2021-07-29 01:43:23 -04:00
Rapptz 8fb998b599 Refactor utcfromtimestamp to use fromtimestamp(..., tz=utc) 2021-07-09 04:20:45 -04:00