Rapptz
29d4c26466
Upgrade WebhookMessage.channel to Thread if available
2022-04-10 18:15:02 -04:00
Rapptz
538ba0d076
Update Webhook.channel typing to include VoiceChannel as well
2022-04-10 18:11:44 -04:00
Rapptz
b561024163
Fix WebhookState not handling reaction emoji
...
Fix #7842
2022-04-04 00:49:36 -04:00
UltimateSppy765
d5d9a532b2
Update docs to reflect Text in Voice related changes
2022-04-03 17:40:51 -04:00
chromacoat dreamkey
7362a2582c
Fix InvalidArgument typo in Webhook.edit
2022-03-26 21:21:37 -04:00
Rapptz
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
Rapptz
d2f6b05c43
Fix missing List -> Sequence typehint in interaction message edit
2022-03-17 10:00:03 -04:00
Josh
e01d4a31eb
Replace invariant container types with wider types where applicable
2022-03-17 07:26:01 -04:00
Stocker
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
Rapptz
3718192b9c
Raise a TypeError if a non-View is passed to Webhook.send
2022-03-12 21:01:07 -05:00
chromacoat dreamkey
095aaa9ad1
Change wording of InvalidArgument removal in docs
2022-03-11 23:25:43 -05:00
Stocker
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
Josh
147948af9b
Use typing.Self throughout library
2022-03-01 07:53:24 -05:00
Rapptz
50ef8e8893
Fix NameError when checking for File instances
2022-03-01 07:21:16 -05:00
Nihaal Sangha
90cabd1673
Fix various typos
2022-02-27 21:19:19 -05:00
Josh
2b69b5d545
Remove discord.InvalidArgument
...
This uses TypeError and ValueError instead.
2022-02-26 01:44:49 -05:00
jack1142
40dc8d1d9d
Change Webhook.avatar to be consistent with User.avatar
2022-02-21 21:13:01 -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
jack1142
dc19c6c7d5
Add positional-only arguments in more places
2022-02-19 20:28:01 -05:00
Rapptz
92d1b4cd2b
Refactor interaction response handling to support files
...
This adds support for file sending and allowed_mentions
2022-02-18 08:10:38 -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
Rapptz
4fa2a6e63e
Fix memory leak in webhooks not deallocating locks
2022-02-17 07:29:06 -05:00
Rapptz
29b808d33f
Change avatar_url type hint to Any instead of str
2021-08-27 05:41:00 -04:00
Steve C
059ec161f8
Fix Webhook return types
...
Also add positional only arguments where applicable
2021-08-26 20:46:25 -04:00
Rapptz
490bbffc93
Remove in-place edits and return fresh instances instead
...
Fixes #4098
2021-08-23 23:46:50 -04:00
Rapptz
9dd86bbcb3
Add type hints to AsyncWebhookAdapter methods
2021-08-23 23:44:20 -04:00
Rapptz
69f578abdc
Fix webhook typings and use PartialMessageable instead of Object
2021-08-22 04:32:15 -04:00
Rapptz
e1e3e298b5
Typehint async_context global variable
2021-08-22 02:37:40 -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
658b61d468
Fix SyncWebhook not working across thread barriers
...
Fix #7310
2021-07-30 22:59:23 -04:00
Rapptz
ecf239d2a2
Fix user cache acting incorrectly with evictions
...
The first issue involved copied users which would lead to user updates
causing faster evictions of the cache than was expected.
The second issue involved users that weren't bound to an internal
lifetime eviction policy. These users would not get evicted.
For example, a user without mutual guilds or being part of the internal
cache in general (messages, DMs) would never end up being evicted for
some strange reason. To handle this case, store_user would get a
counterpart named create_user which would create a user without
potentially storing them in the cache. That way only users with a
bound lifetime within the library would be stored.
2021-07-29 01:43:23 -04:00
Rapptz
f7d551953b
Remove extraneous __slots__ assignments
2021-06-28 23:36:20 -04:00
Rafael
cbe7a1b3a2
Add "new in version" missing in webhook documentation
2021-06-27 23:41:00 -04:00
Rapptz
fc66c5b92d
Fix some webhook related type checker errors
2021-06-10 07:57:41 -04:00
Rapptz
92ee2cd598
Add support for thread parameter in Webhook.send
2021-06-08 07:29:15 -04:00
Rapptz
d0097c4281
Remove view syncing before editing in views
...
This prevents a potential race condition when a MESSAGE_UPDATE is
received syncing and refreshing the view components causing a desync.
2021-05-31 05:50:40 -04:00
Rapptz
4a3491cc0a
Check for view finished state before resuming listening on edit
2021-05-31 00:18:06 -04:00
Rapptz
2ebd5315f9
Add support for sending and editing views in Webhook
2021-05-30 11:25:00 -04:00
Rapptz
db58e628ba
Allow Webhook.send to send ephemeral messages
...
This is only available for application webhooks
2021-05-30 10:29:29 -04:00
Rapptz
85758a75b3
Add interaction related endpoints to async webhook
2021-05-27 00:53:14 -04:00
apple502j
5acb3a62f8
Fix Webhook example
2021-05-23 03:42:37 -04:00
Josh
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
Josh
dc67d2bd85
Replace uses of Ellipsis as sentinels with utils.MISSING
2021-05-03 00:31:07 -04:00
NoName
2793fc06d5
Clarify Webhook.send return value documentation
2021-05-02 18:21:11 -04:00
Rapptz
60c1240849
Fix SyncWebhook exception case causing attribute errors
2021-05-01 09:24:40 -04:00
Rapptz
02e21a8905
Fix sending multipart data with SyncWebhook
...
Fixes #6825
2021-05-01 09:21:39 -04:00
Nadir Chowdhury
c786a85a9b
Add utils.MISSING
2021-04-29 01:58:36 -04:00