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.
2021-04-04 10:15:30 -04:00
Rapptz
59aa1a0e5f
Remove asyncio.Task subclass in preference to task names
2021-04-04 07:24:42 -04:00
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`.
2021-04-04 07:03:53 -04:00
Nadir Chowdhury
6887d3946a
[docs] Fix fetch_members/guilds documentation
2021-03-31 21:27:40 -04:00
apple502j
954dd09e18
Deprecate Client.logout
2021-03-31 07:30:41 -04:00
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery
2021-02-24 21:26:51 -05:00
Nadir Chowdhury
427e387a2f
Deprecate non-bot methods
2021-02-23 03:36:37 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present
2021-01-15 05:28:11 -05:00
Nadir Chowdhury
6b803acde4
[chore] Remove redundant imports
...
This also removes the historical patch for NullHandler implemented in bbf1c54, as it has been available since Python 3.1.
2020-11-28 03:16:49 -05:00
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.
2020-11-26 04:43:15 -05:00
Rapptz
28e5b2a5e1
Add Client.intents to query the current intents
...
Closes #5854
2020-09-26 06:35:41 -04:00
Rapptz
005a80303f
Add chunk_guilds_at_startup and deprecate fetch_offline_members
2020-09-24 01:17:04 -04:00
Rapptz
625a5c2a0b
Some documentation fixes for MemberCacheFlags and Intents
2020-09-23 03:21:21 -04:00
Rapptz
8d5c05ed20
Default MemberCacheFlags based on intents
2020-09-23 03:21:21 -04:00
Rapptz
bf8ca58996
Add a special exception for required privileged intents
2020-09-23 03:21:20 -04:00
Rapptz
23ae084b8c
Allow finer grained control over the member cache.
2020-09-23 03:21:20 -04:00
Rapptz
cb8cb557f5
Add Guild.chunk and deprecated Client.request_offline_members
2020-09-23 03:21:19 -04:00
Rapptz
055fe76241
Fix Client.request_offline_members no longer working
2020-09-23 03:21:19 -04:00
Rapptz
a6381dcf77
Add support for guild intents
2020-09-23 03:21:15 -04:00
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.
2020-09-23 03:20:35 -04:00
Michael
93fa46713a
Fix and add documentation
2020-09-23 03:19:35 -04:00
Tarek
7f17dc79a6
Remove namedtuples to better future guard the library
2020-09-21 03:36:58 -04:00
alkatar21
dce653a0eb
Don't call close() if we've already been closed in Client.run
2020-09-01 15:24:47 -04:00
Nanofaux
dd408f6871
Fix hyperlink reference to PartialInviteChannel in Client
2020-08-22 16:26:24 -04:00
Josh
a947c7a6ec
Fix gramatical error in Client guild_subscriptions docs
2020-08-04 21:47:33 -04:00
Rapptz
d37b91dfc6
Add guild_ready_timeout to control the timeout of GUILD_CREATE stream
...
This also fixes a timing issue where READY would take far too long to
load for big bot authors.
Closes #4112
2020-07-25 09:59:40 -04:00
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.
2020-07-25 09:59:40 -04:00
Rapptz
394b514cc9
Add before_identify_hook to have finer control over IDENTIFY syncing
2020-07-25 09:59:39 -04:00
Rapptz
b8154e365f
Rewrite gateway to use aiohttp instead of websockets
2020-07-25 09:59:38 -04:00
Rapptz
09ecb16680
Rewrite of AutoShardedClient to prevent overlapping identify
...
This is experimental and I'm unsure if it actually works
2020-07-25 09:59:37 -04:00
NCPlayz
ce03c62c6b
[bugs] stop resolving Object for template/invite; remove dupe methods
2020-06-29 16:58:19 +01:00
Nadir Chowdhury
2b3c6e0d47
Add support for Discord templates
2020-06-28 14:48:04 -04:00
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation ( #5067 )
2020-06-28 03:45:58 -04:00
Rapptz
66c6be50d8
Prepare for the discord.com domain rename
2020-05-23 21:44:30 -04:00
Rapptz
13a3f760e6
Fix timeout issues with fetching members via query_members
...
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.
2020-05-10 19:35:45 -04:00
Rapptz
d853a57e86
Rename allowed mention parameters to allowed_mentions
2020-04-04 13:22:51 -04:00
Rapptz
730d79d60a
Allow introspection and setting of global allowed mention configuration
2020-04-04 12:49:39 -04:00
Rapptz
481b335f2d
Fix various implementation bugs with allowed mentions
2020-04-04 12:45:17 -04:00
Rapptz
041785937e
Add support for configuring allowed mentions per message or bot wide.
2020-04-04 07:40:51 -04:00
Rapptz
6c764465c0
Fix regression with Member.activities not clearing
2020-04-04 03:17:31 -04:00
Rapptz
403651a144
Change default close code to 4000 instead of 1000.
...
This prevents our sessions from being invalidated by Discord which
caused a lot of failures when resuming. This caused an unnecessary
amount of IDENTIFYs to happen depending on the circumstances.
Closes #2631
See also discord/discord-api-docs#1472
2020-04-04 01:42:08 -04:00
jack1142
7b3335a0b0
Don't add None to Member.activities tuple
2020-04-04 01:12:46 -04:00
Glazed_Belmont
6525ac948c
fixing the BaseActivity links
2020-04-04 01:12:08 -04:00
Rapptz
17f343b03e
Minor documentation fixes
2020-01-21 21:34:58 -05:00
Rapptz
02397306b2
Drop superfluous zero in version related changes in the documentation
2020-01-21 03:47:56 -05:00
Rapptz
6071607176
Bump copyright year to 2020
...
Closes #2510
2020-01-19 20:03:00 -05:00
Rapptz
5f7a97ff96
Document BaseActivity
2020-01-14 22:09:24 -05:00
Rapptz
42a084028c
Expose _ActivityTag as BaseActivity to easily refer to.
2020-01-14 20:56:00 -05:00
Rapptz
c62b6c3e88
Fix more deprecation warnings for 3.8
2019-11-26 05:19:11 -05:00
Rapptz
a6f61dcbde
Fix all deprecation warnings for 3.8
2019-11-20 02:30:19 -05:00