Rapptz
4c8b1f9abd
Remove unused imports
3 years ago
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.
3 years ago
Rapptz
f435d160dd
Add Interaction.client property
3 years ago
Josh
147948af9b
Use typing.Self throughout library
3 years ago
Rapptz
ae1aaac5a7
Add support for autocomplete
3 years ago
Rapptz
0d2db90028
Implement slash commands
3 years ago
Nadir Chowdhury
3c6279b947
Implement Guild Scheduled Events
3 years ago
Rapptz
8d52ddaff6
Fix remaining type errors in main package
This doesn't fix the type errors in the ext packages though.
3 years ago
Josh
285069de08
Fix types in guild.py
3 years ago
Rapptz
24b729ed0d
Fix up some type ignores in state.py
3 years ago
Nadir Chowdhury
3cf000d467
Type up gateway payloads
3 years ago
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.
3 years ago
Josh
19c6687b55
Add support for Modal Interactions
3 years ago
Alex Nørgaard
2e5da07180
Fix unknown DMChannel in MessageReference.resolved.channel
Threads would cause the message reference to resolve to a DMChannel
3 years ago
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.
3 years ago
dolfies
fba0cc6119
Parse sessions key in READY
3 years ago
dolfies
4c4e9baa42
Actually fix thread handling for realsies
3 years ago
dolfies
627635cbc3
Fix thread events, add a missing thread field, fix reason not being sent when editing threads
3 years ago
dolfies
a86d42ce55
Fix interactions
3 years ago
dolfies
6420dfdc0f
fix client presences/sessions; add timeout capability; remove GuildIterator; add proper team/application support
3 years ago
dolfies
8fff4b01f2
Fix Interaction.name for own interactions
3 years ago
dolfies
1a1b9cf15a
Implement connections, add fetch_sticker_pack, fix some small issues
3 years ago
dolfies
749de62991
Move Interaction to its own file
3 years ago
dolfies
397bca6b14
Improve interaction object, implement message.interaction, implement Attachment.description
3 years ago
dolfies
13b6ab07fd
Further improve thread events
4 years ago
dolfies
8ed7091d9d
Improve thread event parsing and add DM closing
4 years ago
dolfies
d20b444bfb
Preliminary thread support
4 years ago
dolfies
6b0b510818
Handle interaction events
4 years ago
dolfies
1646421cc0
Implement guild notification settings
4 years ago
dolfies
7b11d8c256
Get it starting
4 years ago
dolfies
c6e6c22a95
Migrate state.py
4 years ago
dolfies
9c5e4882ef
Initial de-botting
4 years ago
Rapptz
d17551f51f
Fix typing for private channel by user lookup
4 years ago
Rapptz
ea2d972666
Make global log variable in modules private
4 years ago
Rapptz
311eac97b0
Reformat state.py
4 years ago
Rapptz
d5033b04a2
Don't clear views in READY
4 years ago
Stocker
7592300535
Typehint state.py
4 years ago
Rapptz
fbc4a51c35
Fix on_typing not dispatching for threads
4 years ago
Rapptz
0df3f51a0b
Partially type-hint state.py
This is just work to get started. A more complete type hint will come
later.
4 years ago
Rapptz
dc9c224b54
Undo coercion of partial DMChannel to PartialMessageable
4 years ago
Rapptz
1279510194
Add support for PartialMessageable instances
This allows library users to send messages to channels without fetching
it first.
4 years ago
Rapptz
2de0398d66
Cast removed thread member IDs to int
4 years ago
Rapptz
2cb5ce981e
FIx on_thread_member_remove passing in None
4 years ago
Rapptz
41f3998a08
Fix on_thread_member_remove not dispatching
4 years ago
Nadir Chowdhury
60d82cf908
implement guild stickers
4 years ago
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.
4 years ago
Rapptz
8fb998b599
Refactor utcfromtimestamp to use fromtimestamp(..., tz=utc)
4 years ago
Rapptz
826ce101fd
Change WEBHOOK_UPDATE to use guild information from gateway
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.
4 years ago
Rapptz
b4e39668fb
Change CHANNEL_PINS_UPDATE to use guild information from gateway
This changes the channel lookup from O(n) to two amortised O(1) lookups
4 years ago
Rapptz
03cd6ff433
Remove calls to gc.collect in ConnectionState
For some bots this was actually a performance bottleneck, might as
well remove it if it causes bad performance
4 years ago