Commit Graph

52 Commits

Author SHA1 Message Date
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
50caa3c82c Add support for components V2
Co-authored-by: Michael H <michael@michaelhall.tech>
Co-authored-by: Soheab <33902984+Soheab@users.noreply.github.com>
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Jay3332 <40323796+jay3332@users.noreply.github.com>
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2025-08-13 20:37:23 -04:00
6ab747f9e5 Add support for sending views in stateless webhooks 2025-02-17 18:37:20 -05:00
e43bd8692c Add support for Polls
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Josh <8677174+bijij@users.noreply.github.com>
Co-authored-by: Trevor Flahardy <75498301+trevorflahardy@users.noreply.github.com>
2024-05-10 06:14:12 -04:00
5497674ae2 Add support for applied_tags in Webhook.send overloaded methods 2024-04-18 03:38:10 -04:00
425edd2e10 Improve __repr__ for Webhook and SyncWebhook 2024-03-22 10:02:45 -04:00
3951b61440 Allow Interaction webhook URLs to be used in Webhook.from_url 2023-05-19 09:44:23 -04:00
da10065c19 Fix channel edits on webhooks sending two requests 2023-04-27 18:05:43 -04:00
53de3f9cbb Fix return types in sync.py docstring 2023-03-30 08:35:53 -04:00
183675be74 Add support for silent messages 2023-02-08 15:40:33 -05:00
7e95f98521 Fix webhooks and interactions not closing files after a request 2023-01-25 04:22:24 -05:00
6981eb69c4 Normalize type formatting in TypeError
Normalize most mixed usages of `__class__`, `__class__!r`, 
`__class__.__name__!r` to the standard form of 
`__class__.__name__`
2022-09-12 15:25:55 -04:00
7d1cb08c6d Remove buckets from webhook ratelimit warnings 2022-08-30 00:53:47 -04:00
3af6b9a1e9 Fix unescaped period in webhook regex 2022-08-30 00:53:28 -04:00
b95db674c0 Fix some typos 2022-06-27 22:34:45 -04:00
85495a910c Add extra details to rate limit logs
- Include the rate limit bucket for webhooks
- Enable `stack_info` for the 429 warning.
2022-06-16 18:52:37 -04:00
e543abd950 Add support for new thread_name parameter in Webhook.send 2022-05-31 18:25:26 -04:00
f82ec46acf Use json_or_text helper for parsing webhook responses 2022-05-30 08:48:36 -04:00
c779e34fa0 Use explicit UTF-8 encoding in SyncWebhook 2022-05-08 00:13:06 -04:00
d56f5150fa Fix oversight of edit parameters not being keyword only 2022-05-04 05:02:42 -04:00
8699d2139a Improve generic duck type programming with PartialMessageable
This adds jump_url, permissions_for, and created_at. Luckily, most
cases of this type being constructed already have the guild_id at
creation time.
2022-05-03 10:49:52 -04:00
cf2707b2fb Propagate thread_id in webhook message methods
This also adds the remaining thread parameters where they were missing
2022-03-20 19:43:51 -04:00
e01d4a31eb Replace invariant container types with wider types where applicable 2022-03-17 07:26:01 -04:00
5aa696ccfa Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-03-13 23:52:10 -04:00
095aaa9ad1 Change wording of InvalidArgument removal in docs 2022-03-11 23:25:43 -05:00
554d2d7c99 Add the suppress_embeds parameter to send methods
Modified the following methods:

- abc.Messageable.send
- Webhook.send
- SyncWebhook.send
- InteractionResponse.send_message
2022-03-05 22:19:33 -05:00
147948af9b Use typing.Self throughout library 2022-03-01 07:53:24 -05:00
2b69b5d545 Remove discord.InvalidArgument
This uses TypeError and ValueError instead.
2022-02-26 01:44:49 -05:00
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
dede5539ee Add support for editing message attachments 2022-02-19 22:02:53 -05:00
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
4fa2a6e63e Fix memory leak in webhooks not deallocating locks 2022-02-17 07:29:06 -05:00
29b808d33f Change avatar_url type hint to Any instead of str 2021-08-27 05:41:00 -04:00
059ec161f8 Fix Webhook return types
Also add positional only arguments where applicable
2021-08-26 20:46:25 -04:00
490bbffc93 Remove in-place edits and return fresh instances instead
Fixes #4098
2021-08-23 23:46:50 -04:00
69f578abdc Fix webhook typings and use PartialMessageable instead of Object 2021-08-22 04:32:15 -04:00
4a72201617 Make json conversion functions private 2021-08-22 02:35:58 -04:00
ea2d972666 Make global log variable in modules private 2021-08-22 02:33:51 -04:00
658b61d468 Fix SyncWebhook not working across thread barriers
Fix #7310
2021-07-30 22:59:23 -04:00
f7d551953b Remove extraneous __slots__ assignments 2021-06-28 23:36:20 -04:00
92ee2cd598 Add support for thread parameter in Webhook.send 2021-06-08 07:29:15 -04:00
3864fb37a0 Fix various reference issues in documentation
Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
2021-05-06 07:51:07 -04:00
dc67d2bd85 Replace uses of Ellipsis as sentinels with utils.MISSING 2021-05-03 00:31:07 -04:00
2793fc06d5 Clarify Webhook.send return value documentation 2021-05-02 18:21:11 -04:00
60c1240849 Fix SyncWebhook exception case causing attribute errors 2021-05-01 09:24:40 -04:00
02e21a8905 Fix sending multipart data with SyncWebhook
Fixes #6825
2021-05-01 09:21:39 -04:00
c786a85a9b Add utils.MISSING 2021-04-29 01:58:36 -04:00
57dbb37a52 Add fetch_message for webhooks 2021-04-16 11:27:15 -04:00
90d59bb06c Fix overloads on Webhook.send to not require wait kwarg 2021-04-15 19:36:36 -04:00
0542b129c2 Fix WebhookMessage.edit documentation 2021-04-15 09:03:46 -04:00