68 Commits

Author SHA1 Message Date
Dan Hess
81e3f58f43
Fix async adapter detection in message deletion 2021-04-29 19:21:33 -04:00
Rapptz
1c8d1b0289 Recreate aiohttp.FormData objects during request retries
Fixes #6531
2021-03-24 08:50:34 -04:00
Nihaal Sangha
a3f700c11f
Fix references to snowflakes being max 21 long 2021-03-02 19:04:03 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Alex Nørgaard
ab2c433211
Fix AttributeError in Webhook message delete 2020-12-31 05:43:39 -05:00
Rapptz
94f76e6394 Fix webhook state coercion leading to unexpected behaviour.
Fix #6220
2020-12-29 08:26:39 -05:00
Steve C
bde5bb5d5c
Fix WebhookMessages docstrings
Silly danno
2020-12-10 23:32:22 -05:00
Rapptz
44dc7a8e02 Add support for editing and deleting webhook messages.
Fix #6058
2020-12-09 20:15:35 -05:00
Rapptz
450e71f086 Add a more concrete exception for 500 status codes.
Fixes #5797
2020-09-09 21:24:14 -04:00
Rapptz
e6017a2170 Handle cloudflare bans on webhook requests
Fixes #5221
2020-09-09 21:17:28 -04:00
Rapptz
425bb809ed Add logging to webhooks
Fixes #5798
2020-09-09 20:46:16 -04:00
ELginas
298c28a293
Fix a typo with webhook documentation 2020-08-05 21:43:39 -04:00
Nadir Chowdhury
e971e2f16c
Allow more methods to set an audit log reason 2020-06-30 23:35:42 -04:00
Znunu
de556b01d1
Allow Webhook to be hashable and comparable 2020-06-30 23:33:54 -04:00
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation (#5067) 2020-06-28 03:45:58 -04:00
Rapptz
66c6be50d8 Prepare for the discord.com domain rename 2020-05-23 21:44:30 -04:00
Rapptz
8ff285fcbc Documentation fixups for allowed mentions 2020-04-04 13:32:47 -04:00
Rapptz
d853a57e86 Rename allowed mention parameters to allowed_mentions 2020-04-04 13:22:51 -04:00
Rapptz
481b335f2d Fix various implementation bugs with allowed mentions 2020-04-04 12:45:17 -04:00
Rapptz
041785937e Add support for configuring allowed mentions per message or bot wide. 2020-04-04 07:40:51 -04:00
Sebastiaan Zeeff
59ed908ee2 Fix invalid format specifier in PartialWebhookState.__getattr__
The message for the AttributeError raised by the __getattr__ method of
the PartialWebhookState class is formatted using `str.format`. However,
the placeholder contained a stray ":" before the !r specifier. This
caused a ValueError("Invalid format specifier") to be raised whenever
this method was called in lieu of the AttributeError that is intended
to be raised.
2020-02-22 19:05:26 -05:00
Rapptz
4cf5f792d4 Fix Webhook.send returning an empty string when wait=False 2020-02-16 21:52:20 -05:00
Harmon
6f9793fe5e Fixes and improvements for v1.3 documentation
* Add missing versionadded strings for v1.3
* Add missing versionchanged string for Message.edit
* Consistently use versionadded for attributes
* Consistently use versionchanged for parameters
* Use versionchanged for Bot.is_owner
* Fix references in v1.3 changelog
* Improve grammar in v1.3 changelog
2020-01-22 23:55:05 -05:00
Rapptz
eddbe27f2e Fix out of order files being sent in webhooks when there are 10 files. 2020-01-22 20:05:00 -05:00
Rapptz
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
NCPlayz
f554819506 Implement Webhook.type 2019-11-26 05:16:53 -05:00
Rapptz
a6f61dcbde Fix all deprecation warnings for 3.8 2019-11-20 02:30:19 -05:00
Devon R
bf9b9c5879 Adjust BASE urls to have no trailing slash (consistency) 2019-11-15 04:25:38 -05:00
Devon R
f5ebf42e1f Return invites as https, various URL normalization 2019-11-15 04:25:38 -05:00
NCPlayz
dab2519a09 Implement TextChannel.follow() 2019-11-15 04:23:15 -05:00
Xua
4c3e53edf4 Fix webhooks not re-raising after retries run out 2019-10-20 05:20:15 -04:00
Rapptz
45375364b7 Fix breakage with webhook tokens being missing. 2019-07-22 20:55:43 -04:00
NCPlayz
3c9bcc2851 Improve documentation 2019-06-07 19:27:46 -04:00
Rapptz
fcf02414fe Fix stray colon in Asset related docstrings 2019-06-04 19:06:31 -04:00
Vexs
bf5b267c55 Correct the documentation for methods and properties that return Assets 2019-05-14 19:13:48 -04:00
Rapptz
8206982e79 Don't overwrite data parameter in webhooks.
Fixes #2140
2019-05-10 20:54:51 -04:00
Rapptz
919dbcafb3 Consistent use of __all__ to prevent merge conflicts. 2019-04-20 17:20:58 -04:00
Rapptz
f71fd33eba Fix UnboundLocalError when RequestsWebhookAdapter raises an error. 2019-04-15 07:16:23 -04:00
NCPlayz
be227ebcf0 Redesign asset retrieval in the library.
Most assets now return a new class named `Asset`. This allows for the
assets to be consistently saved via a `save` method instead of special
casing for `Attachment`.

`AppInfo` is no longer a namedtuple it is a fully documented dataclass,
as well as having the state attached to it.

Fixes #1997
2019-04-06 19:12:50 -04:00
Rapptz
548b9d5693 Double underscore HTTPClient's internal session. 2019-03-24 14:45:18 -04:00
NCPlayz
fb02191b80 Organise documentation 2019-03-19 08:24:42 -04:00
Rapptz
5e65ec978c Take back ownership of files from aiohttp for retrying requests.
Fix #1809
2019-03-18 07:54:36 -04:00
Rapptz
c960465366 Mock a ConnectionState object to fix wait=True errors in webhooks.
Fixes #1898
2019-03-02 06:14:10 -05:00
Rapptz
311788c7cb Properly clean-up file objects when necessary instead of instantly.
Fix #1770
2019-03-02 05:52:22 -05:00
Bryan Forbes
e2478b17c9 Bump aiohttp requirement and fix AsyncWebhookAdapter 2019-02-12 18:55:19 -06:00
Dante Dam
9656a21ebe Bumped copyright years to 2019. 2019-01-28 22:22:50 -05:00
Dice
33dc3411ac Fix Webhook states for stateful objects 2019-01-28 21:41:55 -05:00
Chris Rrapi
dd41dac680 Fix AttributeError in webhook.send 2018-11-29 05:23:15 -05:00
Terrance
a105f8b8cc Webhooks: add support for multi-file upload
`Webhook.send()` now accepts a `files` kwarg holding a list of `File`
objects, which are included in the HTTP request as `file1`, `file2` and
so on.

This is an undocumented feature of the Discord API, but is analogous
with the client's sending of messages with multiple files.
2018-11-24 22:38:50 -05:00
Hornwitser
efb4ff850e [lint] Fix import order
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
2018-11-24 22:17:58 -05:00