Commit Graph
337 Commits
Author SHA1 Message Date
Josh c8064ba6f2 Type-hint gateway 2022-02-22 03:59:58 -05:00
Rapptz 30e7a2e937 Fix a few more type errors 2022-02-21 23:31:18 -05:00
Rapptz c7c6d74d8d Fix type errors in the abc module 2022-02-21 22:38:36 -05:00
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.
2022-02-20 08:04:58 -05:00
Josh dede5539ee Add support for editing message attachments 2022-02-19 22:02:53 -05:00
Rapptz e14153ddcb Fix nonce being sent even when not specified 2022-02-18 23:15:46 -05:00
Josh 37f96e3473 Add message_content intent and move to api v10 2022-02-18 08:44:46 -05:00
Rapptz 9c066a8cf6 Refactor internal message sending and editing parameter passing
This reduces some repetition in many functions and is ripped out of
the webhook code. This also removes the unused HTTP functions for
interaction responses since those belong in the webhook code rather
than the HTTPClient.
2022-02-18 07:47:59 -05:00
Josh 08bee0eeb6 Add support for file/attachment descriptions 2022-02-18 05:23:02 -05:00
Josh e05c80b963 [types] Refactor and add Application Command types 2022-02-18 03:22:40 -05:00
Nadir Chowdhury 3c0c0f76d7 Add guild scheduled events HTTP methods 2022-02-17 22:16:51 -05:00
jack1142 783513726f Add support for role icons
* Document ROLE_ICONS guild feature
https://github.com/discord/discord-api-docs/pull/3847

* Add support for role icons
https://github.com/discord/discord-api-docs/pull/3847

* Add support for role icon/emoji changes in audit log
https://github.com/discord/discord-api-docs/pull/3847
2022-02-17 11:28:03 -05:00
jack1142 9a6b2fa402 Add Thread.fetch_member
See: discord/discord-api-docs#3998
2022-02-17 11:26:41 -05:00
Nadir Chowdhury d034264973 Type up Guild Scheduled Events 2022-02-17 11:25:18 -05:00
Danny e7821be4aa Add default value for invitable in HTTPClient 2021-08-26 17:51:49 -04:00
Josh d2ea33e5e9 Add support for invitable thread option 2021-08-26 15:52:07 -04:00
Rapptz c82739a3be Fix some typings in HTTPClient to not take strict payload types 2021-08-23 23:52:16 -04:00
Rapptz cff9ca0288 Fix typings for member HTTP methods 2021-08-23 23:44:20 -04:00
Stocker 400936df69 Fix type for content param in HTTPClient.send_message 2021-08-23 05:24:43 -04:00
Rapptz 4a72201617 Make json conversion functions private 2021-08-22 02:35:58 -04:00
Rapptz ea2d972666 Make global log variable in modules private 2021-08-22 02:33:51 -04:00
Rapptz b73f02b9c3 Remove deprecated TextChannel.active_threads for Guild version
This also fills in the ThreadMember data from the endpoint
2021-08-18 01:52:24 -04:00
Rapptz 08a4db3961 Revert "Refactor Client.run to use asyncio.run"
This reverts commit 6e6c8a7b28.
2021-08-11 02:16:22 -04:00
Rapptz 6e6c8a7b28 Refactor Client.run to use asyncio.run
This also adds asynchronous context manager support to allow for
idiomatic asyncio usage for the lower-level counterpart. At first
I wanted to remove Client.run but I figured that a lot of beginners
would have been confused or not enjoyed the verbosity of the newer
approach of using async-with.
2021-08-10 23:00:24 -04:00
Rapptz 1c40d43fd1 Remove unused log lines in HTTPClient 2021-08-10 09:28:54 -04:00
Rapptz 58ca9e9932 Add TextChannel.default_auto_archive_duration 2021-08-02 04:36:02 -04:00
Rapptz 3a451c9c65 Change payload to use sticker_ids instead of sticker_items 2021-07-30 23:19:25 -04:00
Rapptz 6beef898c6 Rename instances of nitro to premium 2021-07-30 23:10:36 -04:00
Nadir Chowdhury 60d82cf908 implement guild stickers 2021-07-30 21:25:41 -04:00
Rapptz dac0267e28 Allow creating a public thread without a starter message 2021-07-28 23:50:02 -04:00
Nadir Chowdhury 96b9a0e09d Add reason kwarg to more methods 2021-07-28 19:54:32 -04:00
Willy 23852404ed Fix incorrect typehint in send_message 2021-07-21 02:52:51 -04:00
Lilly Rose Berner 0aa825557d Re-try requests on 504 error and raise correct error 2021-07-09 04:54:22 -04:00
Rapptz 88d825a803 Allow use of orjson instead of json
The difference in speed seems negligible at start up, which is when
most time is taken for actually parsing JSON. I could potentially be
missing something but profiling didn't point to any discernable
difference.
2021-07-07 20:19:17 -04:00
Rapptz 750ba88f2c Fix typing errors with Client 2021-07-04 07:55:20 -04:00
Rapptz 7d9074db8a Fix type errors and potentially unbound code in http.py 2021-07-04 06:18:34 -04:00
Rapptz 6f3b8072d6 Rework User.edit to have proper typing 2021-06-29 22:05:29 -04:00
Aomi Vel 47e6a754e4 Add support for sending multiple embeds 2021-06-27 23:52:48 -04:00
Josh 35a9533e8d Type-Hint http.py 2021-06-10 07:34:41 -04:00
Rapptz d0d2d7ea62 Clarify actions that require manage_threads permission 2021-06-08 07:26:22 -04:00
Rapptz 72c66a1706 Bump gateway API to v9 2021-06-08 07:26:22 -04:00
Rapptz 4a4e73ec14 Update thread typings and payloads to match documentation 2021-06-08 07:26:18 -04:00
Rapptz c1ce3b949f Implement remaining HTTP endpoints on threads
I'm not sure if I missed any -- but this is the entire documented set
so far.
2021-06-08 07:25:30 -04:00
Rapptz 68c7c538f5 First pass at preliminary thread support
This is missing a lot of functionality right now, such as two gateway
events and all the HTTP CRUD endpoints.
2021-06-08 07:23:40 -04:00
Nadir Chowdhury 94bbdc154c update types subpackage with latest docs 2021-06-07 23:20:47 -04:00
MhmCats 0847085661 Add support for editing guild widgets 2021-06-02 02:39:08 -04:00
Nadir Chowdhury 9f98a9a87f Implement StageInstance 2021-05-30 13:51:52 -04:00
Zomatree b48f510e15 Add invite targets for voice channel invites 2021-05-29 00:15:46 -04:00
Rapptz 98570793e4 Add initial support for buttons and components 2021-05-27 00:53:13 -04:00
Rapptz 1bf7aadf94 Typehint emoji classes 2021-05-05 23:48:36 -04:00