Commit Graph
57 Commits
Author SHA1 Message Date
levin 7f9c3b1b40 Fix FFmpeg errors not sent to after callback 2026-02-25 12:03:02 -05:00
Rapptz 44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
Rapptz df4b1c88df Move MissingApplicationID to top-level discord namespace 2024-08-31 08:51:56 -04:00
Rapptz 1fa7d7e402 Raise special CommandSyncFailure during sync for better errors
This is parsed from the error to allow for users to better debug
what exactly is causing the issue in sync.
2022-08-12 22:36:13 -04:00
Rapptz cbf02eda0c Fix bolded HTTPException not working due to rST limitation 2022-07-29 21:58:32 -04:00
Rapptz 76402b00f9 Allow configuring the maximum ratelimit timeout before erroring
This is useful for cases where a rate limit is known to be
extraordinarily high, but you still want to handle the error.
This is common with routes such as emoji creation.
2022-07-19 01:36:18 -04:00
Josh c9f777c873 Fix type annotations to adhere to latest pyright release 2022-06-12 15:30:45 -04:00
apple502j ad478ff2da [docs] Update PrivilegedIntentsRequired docs 2022-04-06 04:26:36 -04:00
jack1142 5ffa3e85de Update comments after # type: ignore to be compatible with PEP 484 2022-03-27 22:26:34 -04:00
James Hilton-Balfe 01906f37f1 Remove NoMoreItems 2022-03-06 18:44:18 -05:00
Josh 2b69b5d545 Remove discord.InvalidArgument
This uses TypeError and ValueError instead.
2022-02-26 01:44:49 -05:00
Rapptz d01e73fca5 Document more uses of type ignore 2022-02-21 23:08:26 -05:00
Rapptz 6268cad402 ResponseType type alias is private 2021-08-22 02:28:37 -04:00
Rapptz a8db8546db Typehint error.py 2021-07-03 00:54:36 -04:00
Rapptz 0fae0b4995 Use "raised" instead of "thrown" for exception documentation 2021-07-03 00:35:21 -04:00
Rapptz 7ca90874b9 Raise an exception if an interaction has been responded before
Fix #7153
2021-07-03 00:30:32 -04:00
Nadir Chowdhury 89456022cf Add __all__ to remaining modules 2021-04-07 02:30:32 -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 63ec23bac2 Code optimisations and refactoring via Sourcery 2021-02-24 21:26:51 -05:00
Nihaal Sangha 69bdc3a184 Change copyright year to present 2021-01-15 05:28:11 -05:00
Rapptz bf8ca58996 Add a special exception for required privileged intents 2020-09-23 03:21:20 -04:00
Rapptz 450e71f086 Add a more concrete exception for 500 status codes.
Fixes #5797
2020-09-09 21:24:14 -04:00
Rapptz 3a1a215f8b Propagate manual close codes to socket subclass
aiohttp seems to not set it during its state machine flow
2020-08-05 04:27:11 -04:00
Rapptz b8154e365f Rewrite gateway to use aiohttp instead of websockets 2020-07-25 09:59:38 -04:00
Rapptz 6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
NCPlayz 3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
NCPlayz f7c6c5995d Implementing GET '/channels/:id' & '/guilds/:id/channels'
Signed-off-by: NCPlayz <chowdhurynadir0@outlook.com>
2019-06-07 19:12:59 -04:00
Rapptz d96b8a0b80 Add Discord error code to HTTPException message. 2019-05-24 04:23:06 -04:00
Rapptz c30a366106 Try to consistently use "inherit" vs "derive" in documentation. 2019-03-19 09:23:12 -04:00
Dante Dam 9656a21ebe Bumped copyright years to 2019. 2019-01-28 22:22:50 -05:00
Hornwitser a71b3b5fa0 [lint] Limit unneccessarily broad except clauses
Add exception qualifier(s) to bare except clauses swallowing exceptions.
2018-11-24 22:17:57 -05:00
Rapptz f25091efe1 Drop support for Python 3.4 and make minimum version 3.5.2. 2018-06-10 18:10:00 -04:00
Tobotimus 3112e1c17e Add intersphinx 2018-01-06 17:23:59 -05:00
Rapptz 37b0fdb898 Add webhook support.
Allows for usage of either `requests` and `aiohttp` when used in
"Standalone" mode.

Fixes #704
2017-08-21 01:57:07 -04:00
Rapptz 3983eb3ba5 Support for API v7 error handling. 2017-04-15 19:55:51 -04:00
Rapptz ff9f5749e1 Update copyright year to 2017. 2017-01-20 23:19:19 -05:00
Rapptz 06ca518459 Rename NoMoreMessages to NoMoreItems. 2017-01-11 19:53:48 -05:00
Rapptz 20041ea756 Implement AutoShardedClient for transparent sharding.
This allows people to run their >2,500 guild bot in a single process
without the headaches of IPC/RPC or much difficulty.
2017-01-07 23:19:39 -05:00
Rapptz 53ab263125 Split channel types.
This splits them into the following:

* DMChannel
* GroupChannel
* VoiceChannel
* TextChannel

This also makes the channels "stateful".
2017-01-03 09:51:52 -05:00
Rapptz e8c32c542e Make HTTPException get the error JSON's message attribute. 2016-06-12 20:36:07 -04:00
Rapptz fa36a449e9 Change HTTPException to only take a single parameter. 2016-06-12 13:57:05 -04:00
Rapptz 1c623ccf11 Begin working on gateway v4 support.
Bump websockets requirement to v3.1

Should be squashed...
2016-04-27 18:36:13 -04:00
Rapptz 4d816c4ef3 HTTPException now has a text attribute if JSON is not available. 2016-01-25 01:16:14 -05:00
Rapptz db4cc791dd Update license of files to 2016. 2016-01-04 22:28:29 -05:00
Rapptz 99254fdf96 Add Forbidden and NotFound exceptions. 2015-12-04 01:23:52 -05:00
Rapptz f197c34583 Begin working on asyncio port. 2015-12-04 00:16:34 -05:00
Rapptz b1b2c0d099 Add LoginFailure exception for a clearer failure in Client.login
The older HTTPException is not exactly the clearest thing for people
who are new to programming or HTTP exceptions in general.
2015-11-27 17:03:36 -05:00
Rapptz 4a32ae444a Add the message to the exception output. 2015-11-27 03:34:37 -05:00
Rapptz 57312d96f7 Fix annoying lack of parenthesis at end of HTTPException 2015-11-20 23:35:23 -05:00
Rapptz 9b2a78a031 Add InvalidArgument exception and change exceptions thrown. 2015-10-27 21:25:21 -04:00