DA344
6214942f86
Fix SessionStartLimits and SKU.subscriptions docstrings
3 months ago
Michael H
9806aeb831
Add public method to get session start limits
4 months ago
Michael H
88f62d85d2
Ensure Client.close() has finished in __aexit__
This wraps the closing behavior in a task. Subsequent callers of
.close() now await that same close finishing rather than short
circuiting. This prevents a user-called close outside of __aexit__ from
not finishing before no longer having a running event loop.
11 months ago
Rapptz
cb3ea9b889
Add shard_connect_timeout parameter for AutoShardedClient
1 year ago
Rapptz
ca5cbcbdf3
Reconnect a shard if disconnected during a HELLO OP
2 years ago
Rapptz
8aaeb6acfa
Parse gateway URL as an actual URL using yarl
Discord has changed the URL format to make it infeasible to edit it
using basic string interpolation.
3 years ago
Rapptz
3802780f77
Change a lot of logging INFO calls to be less verbose
Some of the logs were only useful for debug scenarios, so they have
been downgraded to DEBUG. Others were in INFO but supposed to be in
WARNING so those were upgraded.
3 years ago
Rapptz
7da2048d1a
Add support for resume_gateway_url
3 years ago
Rapptz
2d586ae805
Add initial support for app command localisation
3 years ago
Rapptz
b917904c1b
Prevent launching shards when bot is closed
Fix #8210
3 years ago
Rapptz
768242b00e
Fix typo in async with documentation
3 years ago
James Hilton-Balfe
5d1b63bfee
[docs] Add async with documentation for Client
Co-authored-by: Rapptz <[email protected] >
3 years ago
Lilly Rose Berner
2dbf14bb72
Separately delay ready event for each shard
3 years ago
Rapptz
76cc2c2272
Require passing intents to Client and its subclasses
3 years ago
Kellen
4fd2d5fdfd
Remove redundant imports and variables
3 years ago
Stocker
5aa696ccfa
Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <[email protected] >
Co-authored-by: Josh <[email protected] >
3 years ago
Rapptz
9c61e10a55
Move all async object creation to a proper initialisation point
This should make it so no object is created with another loop
3 years ago
Rapptz
8d4f08a5e7
Fix AutoShardedClient to work with the new asyncio loop machinery
Fix #7675
3 years ago
Han Seung Min - 한승민
93af158b0c
Refactor loop code to allow usage of asyncio.run
3 years ago
chromacoat dreamkey
095aaa9ad1
Change wording of InvalidArgument removal in docs
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
Josh
2b69b5d545
Remove discord.InvalidArgument
This uses TypeError and ValueError instead.
3 years ago
Josh
a315786869
Handle type-errors in upcoming pyright release
3 years ago
jack1142
dc19c6c7d5
Add positional-only arguments in more places
3 years ago
Rapptz
1b5c206279
Fix broken rename from pyright
4 years ago
Rapptz
ea2d972666
Make global log variable in modules private
4 years ago
Rapptz
8d80259a80
Reformat shard.py
4 years ago
Stocker
5390caa67d
Typehint shard.py
4 years ago
Aaron Hennessey
15eb3d2e5d
Remove afk parameter from change_presence
4 years ago
Rapptz
a8da7d03b9
Remove AutoShardedClient.request_offline_members
4 years ago
Nadir Chowdhury
89456022cf
Add `__all__` to remaining modules
4 years ago
Rapptz
54288879e2
Remove userbot functionality
This has a lot of legacy and cruft so there may be some stuff I've
missed but this first pass is enough to get a clear separation.
4 years ago
Rapptz
9d39b135f4
Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
4 years ago
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery
4 years ago
Nihaal Sangha
69bdc3a184
Change copyright year to present
4 years ago
Rapptz
12d0ae71df
Add a way to check if the websocket is rate limited.
This is mainly for low level decision making for utilities that need
to know whether to fetch a member by HTTP or to query through the
websocket.
The library already does this trick in some places so it's only fair
that end users possess the same ability as well.
4 years ago
Rapptz
005a80303f
Add chunk_guilds_at_startup and deprecate fetch_offline_members
5 years ago
Rapptz
bf8ca58996
Add a special exception for required privileged intents
5 years ago
Rapptz
cb8cb557f5
Add Guild.chunk and deprecated Client.request_offline_members
5 years ago
Rapptz
055fe76241
Fix Client.request_offline_members no longer working
5 years ago
Rapptz
0b93fa3a82
Implement VoiceProtocol lower level hooks.
This allows changing the connect flow and taking control of it without
relying on internal events or tricks.
5 years ago
Rapptz
4ccd9c1591
Remove caching from AutoShardedClient.shards
5 years ago
Rapptz
50f4c31d31
Terminate shard processing queue when a clean close is encountered.
Fix #5180
5 years ago
Rapptz
b77af19939
Fix AttributeError from internal queue being double underscore.
5 years ago
Rapptz
7ed26db3b3
Add an exposed way to extract shard-specific information.
Closes #2654
5 years ago
Rapptz
a42bebe581
Propagate exceptions when an unhandled error happens
5 years ago
Rapptz
e2f42597a5
Handle Connection Reset by Peer connection errors.
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.
5 years ago
Rapptz
8070d39a23
Add shard related connection and resume events.
These include:
* on_shard_resumed
* on_shard_connect
* on_shard_disconnect
5 years ago