53 Commits

Author SHA1 Message Date
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
Rapptz
5c24e69cf2 Fix up the Sphinx strings causing warnings. 2018-09-15 09:54:00 -04:00
Hornwitser
c557ee33ca [lint] Fix types used for __slots__ and __all__
Stay consistent with the rest of the library and use lists for module
__all__ values and tuples for class __slots__ attributes.
2018-08-22 21:43:55 -04:00
Hornwitser
c8b49d37be [lint] Fix incorrect and inconsistent whitespace
Adjust whitespace to be consistent with the rest of the library.
2018-08-22 21:43:53 -04:00
Rapptz
f25091efe1 Drop support for Python 3.4 and make minimum version 3.5.2. 2018-06-10 18:10:00 -04:00
Rapptz
eb5defed00 Fix Webhook.guild raising an AttributeError.
Fixes #1148
2018-03-16 17:59:50 -04:00
Tobotimus
3112e1c17e Add intersphinx 2018-01-06 17:23:59 -05:00
Rapptz
30b5047b0e Fix multipart sending for RequestsWebhookAdapter to work. 2018-01-03 21:55:48 -05:00
Rapptz
5013102574 Fix Webhook.delete not working. 2017-11-07 05:36:55 -05:00
rooni
415ca9a774 Add webhook.url 2017-09-18 19:31:20 +02:00
Rapptz
8912625428 Fix docstrings for Webhook.send 2017-09-08 04:23:11 -04:00
Rapptz
99bd595f5e Rename webhook parameters to payload to avoid shadowing.
The old names clashed with the `json` module.
2017-08-24 22:23:14 -04:00
Rapptz
e7d3085445 Webhook URLs can have dashes and underscores. 2017-08-22 17:52:10 -04:00
Steve C
7ee5dc22fb Fix a couple docstrings 2017-08-22 04:45:52 -04:00
Rapptz
8eb6fa0329 Fix multi-part sending with aiohttp in webhooks. 2017-08-22 00:26:43 -04:00
Rapptz
754f3a2ae9 Don't make session a keyword only argument. 2017-08-21 14:57:57 -04:00