Commit Graph

593 Commits

Author SHA1 Message Date
dd408f6871 Fix hyperlink reference to PartialInviteChannel in Client 2020-08-22 16:26:24 -04:00
a947c7a6ec Fix gramatical error in Client guild_subscriptions docs 2020-08-04 21:47:33 -04:00
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
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
394b514cc9 Add before_identify_hook to have finer control over IDENTIFY syncing 2020-07-25 09:59:39 -04:00
b8154e365f Rewrite gateway to use aiohttp instead of websockets 2020-07-25 09:59:38 -04:00
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
ce03c62c6b [bugs] stop resolving Object for template/invite; remove dupe methods 2020-06-29 16:58:19 +01:00
2b3c6e0d47 Add support for Discord templates 2020-06-28 14:48:04 -04:00
b4b953bfc6 Fix various inconsistencies within the documentation (#5067) 2020-06-28 03:45:58 -04:00
66c6be50d8 Prepare for the discord.com domain rename 2020-05-23 21:44:30 -04:00
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
d853a57e86 Rename allowed mention parameters to allowed_mentions 2020-04-04 13:22:51 -04:00
730d79d60a Allow introspection and setting of global allowed mention configuration 2020-04-04 12:49:39 -04:00
481b335f2d Fix various implementation bugs with allowed mentions 2020-04-04 12:45:17 -04:00
041785937e Add support for configuring allowed mentions per message or bot wide. 2020-04-04 07:40:51 -04:00
6c764465c0 Fix regression with Member.activities not clearing 2020-04-04 03:17:31 -04:00
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
7b3335a0b0 Don't add None to Member.activities tuple 2020-04-04 01:12:46 -04:00
6525ac948c fixing the BaseActivity links 2020-04-04 01:12:08 -04:00
17f343b03e Minor documentation fixes 2020-01-21 21:34:58 -05:00
02397306b2 Drop superfluous zero in version related changes in the documentation 2020-01-21 03:47:56 -05:00
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
5f7a97ff96 Document BaseActivity 2020-01-14 22:09:24 -05:00
42a084028c Expose _ActivityTag as BaseActivity to easily refer to. 2020-01-14 20:56:00 -05:00
c62b6c3e88 Fix more deprecation warnings for 3.8 2019-11-26 05:19:11 -05:00
a6f61dcbde Fix all deprecation warnings for 3.8 2019-11-20 02:30:19 -05:00
ea3d119ca6 Use X-Ratelimit-Reset-After header by default.
There is now an option to turn it off, of course.
2019-08-27 18:41:32 -04:00
2f7e875a76 Strip tokens before use.
Closes #2135
2019-08-27 04:59:17 -04:00
cf79816c5d Allow disabling the message cache with max_messages=None
This also changes the default to 1000 instead of 5000 since it can
take some time for small bots to cycle through the default and they
make up the majority of it.
2019-08-27 04:50:50 -04:00
c7a1f5e6e9 Disambiguate and normalize documentation for non-bot only methods 2019-08-11 18:50:31 -04:00
18fe2035ef Document that the cache retrieval functions require an int ID.
Closes #2285
2019-07-23 04:01:14 -04:00
92b3a4f8f4 on_member_leave => on_member_remove 2019-07-18 18:06:42 -04:00
7cec42c8f1 Fix doc URL in Client.fetch_guild 2019-07-18 18:06:26 -04:00
f13c1be171 Better knowledge on how guild_subscriptions work now. 2019-07-15 08:01:57 -04:00
ca2ee0655d Add versionadded for guild_subscriptions option. 2019-07-10 05:00:13 -04:00
7b8d50a988 Add support for guild subscriptions. 2019-07-10 04:51:27 -04:00
8f691ae775 Only return exception in Client.run when it's not cancelled. 2019-06-20 23:04:38 -04:00
b2f247bef3 Propagate exception in Client.run
Fix #2237
2019-06-20 23:00:45 -04:00
dfcf9cdb0a Rename error type for X.fetch_channel(s). 2019-06-12 00:47:42 -04:00
34b93c757c docs: Fix minor typo 2019-06-12 00:47:42 -04:00
3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
f7c6c5995d Implementing GET '/channels/:id' & '/guilds/:id/channels'
Signed-off-by: NCPlayz <chowdhurynadir0@outlook.com>
2019-06-07 19:12:59 -04:00
82b54933e2 Add asyncio.Task subclass for better __repr__ for events. 2019-05-19 19:17:29 -04:00
38eb2b4828 Validate kwargs in Client.start 2019-05-19 19:17:27 -04:00
123e151978 Add back signal handling to Client.run
Apparently Python does not transform SIGTERM to KeyboardInterrupt as
nicely as I thought.
2019-05-11 14:40:31 -04:00
de6240f1e7 Rewrite loop cleanup code (again...) and remove signal handling.
This should hopefully be the last time I touch this.
2019-04-26 01:57:33 -04:00
186d9a7f9c Use a regular boolean instead of asyncio.Event for close status. 2019-04-25 01:57:32 -04:00
ceb154718d Add note about overriding Client.close vs Client.logout 2019-04-18 20:04:11 -04:00
b1fae0861a add read-only cached_messages property to Client
For those of us who want access to this sweet trove of zero hop messages
2019-04-17 22:41:59 -04:00