Commit Graph
100 Commits
Author SHA1 Message Date
Rapptz 99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
Rapptz e405bd5f1f Add discord.types.Message.interaction attribute 2021-04-08 02:29:14 -04:00
Rapptz a31c19563f Add interaction related typings 2021-04-08 02:12:55 -04:00
Rapptz 249d94a011 Add AllowedMentions typings 2021-04-08 02:06:19 -04:00
Rapptz d299bfef26 Fix up typings for attachment and message 2021-04-08 01:56:23 -04:00
Rapptz e895a53713 [commands] Add StageChannelConverter to documentation 2021-04-08 00:44:47 -04:00
Rapptz a9d5c0aa3b Fix headers in partial webhook channel and guild objects 2021-04-07 06:37:09 -04:00
Rapptz b818296c21 Remove type hints from generated docs 2021-04-07 06:35:29 -04:00
Rapptz f49d565d51 Rename discord.types file based on relevant core module file 2021-04-07 05:50:54 -04:00
Rapptz 23fe6b46dd Typehint discord.Embed and introduce discord.types subpackage
The discord.types subpackage is currently only used to do type hinting
of API payloads, it's very much incomplete right now and it'll be a
rather long process.

discord.Embed was typehinted and formatted using black.
2021-04-07 05:39:58 -04:00
Rapptz f80b8d3f5d [commands] Only replace annotation if one was given 2021-04-07 03:17:36 -04:00
Rapptz ed1341012b Add Embed.__bool__
Fixes #6661
2021-04-07 00:01:57 -04:00
Rapptz 1d5805ebcb Revert "Remove unused group functionality"
This reverts commit d69b2f0af5.
2021-04-07 00:01:57 -04:00
Rapptz 72275a73fa Use non-underscore TypeVar in enum code 2021-04-06 07:35:02 -04:00
Rapptz 7e3c5f3faf Fix some regressions from create_task change 2021-04-06 07:31:31 -04:00
Rapptz d69b2f0af5 Remove unused group functionality 2021-04-06 07:12:15 -04:00
Rapptz 84e2ff0bc7 Reformat HTTPClient and add interaction endpoints 2021-04-06 05:25:50 -04:00
Rapptz 008432c76a Make enum code work with typecheckers
This also makes it so invalid enum values fall back to a proxy type
that still works similar to actual values.
2021-04-06 01:11:36 -04:00
Rapptz 8cece19b22 Add on_interaction event and Interaction class.
This is the first pass at the functionality. It's currently a bit
incomplete.
2021-04-06 01:11:36 -04:00
Rapptz 1e7f139313 Add support for setting application_id 2021-04-06 01:11:36 -04:00
Rapptz 9ab58d302d [commands] Fix classmethod converters not working.
Protocols sure are annoying.
2021-04-05 23:52:28 -04:00
Rapptz ee5bb07c02 [commands] Revert conversion code back to how it was originally 2021-04-05 23:24:47 -04:00
Rapptz 8da6b47a36 Update changelog for v1.7.1 2021-04-05 21:39:35 -04:00
Rapptz 6d74514729 [commands] Fix logic in Cog.has_error_handler() 2021-04-05 21:39:22 -04:00
Rapptz a3a6f88936 Add discord.utils.utcnow() helper function to ease migration 2021-04-04 23:59:04 -04:00
Rapptz 93a92e6e1b Remove special casing of MAX_ASYNCIO_SECONDS in sleep_until
This compatibility code goes away in Python versions greater than 3.7
2021-04-04 23:55:15 -04:00
Rapptz ff7094ce96 Convert datetimes to aware datetimes with UTC.
Naive datetimes will now be interpreted as local time throughout
the library.
2021-04-04 23:54:08 -04:00
Rapptz fd58371f53 Remove some lingering userbot classes in the documentation 2021-04-04 20:05:19 -04:00
Rapptz 7ba437cece Use 3.8 for ReadTheDocs builds 2021-04-04 20:01:37 -04:00
Rapptz 54288879e2 Remove userbot functionality
This has a lot of legacy and cruft so there may be some stuff I've
missed but this first pass is enough to get a clear separation.
2021-04-04 10:15:30 -04:00
Rapptz 59aa1a0e5f Remove asyncio.Task subclass in preference to task names 2021-04-04 07:24:42 -04:00
Rapptz 94bd1b9822 Convert two missing places to f-strings 2021-04-04 07:17:03 -04:00
Rapptz 4d44872511 Remove encoding header from generated code 2021-04-04 07:06:50 -04:00
Rapptz adaf7c6192 [commands] Use positional only parameter for Context.invoke 2021-04-04 07:04:01 -04:00
Rapptz 9d39b135f4 Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
Rapptz 9fc2ab9c99 Bump minimum Python version to 3.8 2021-04-04 04:30:31 -04:00
Rapptz 68e379bc8b Version bump for development 2021-04-04 03:53:26 -04:00
Rapptz 757dd92272 Version bump to v1.7 2021-04-04 00:54:10 -04:00
Rapptz f6df66a971 Add missing documentation for StoreChannelConverter 2021-04-04 00:21:15 -04:00
Rapptz 6d63cf0d5d Add missing StoreChannel documentation 2021-04-04 00:17:59 -04:00
Rapptz 834a7d80aa Fix StoreChannel reference in changelog 2021-04-04 00:04:30 -04:00
Rapptz f8964b1b32 Add content_type to changelog 2021-04-03 23:33:03 -04:00
Rapptz 5b244a7002 Add changelog for v1.7 2021-04-03 23:09:47 -04:00
Rapptz efc30a146e Guard for None in VocalGuildChannel.members 2021-04-03 23:08:03 -04:00
Rapptz 421c0cd455 [commands] Add missing versionadded on StoreChannelConverter 2021-04-03 22:54:21 -04:00
Rapptz 3576e2ee01 Add support for Permissions.request_to_speak 2021-04-01 00:53:07 -04:00
Rapptz 8a24a93010 Bring back older background task example under a new name 2021-03-30 20:29:03 -04:00
Rapptz e359aeb122 Fix background_task example to actually work 2021-03-30 20:28:41 -04:00
Rapptz 0c3be9713d Raise error if position could not be resolved in GuildChannel.move 2021-03-30 04:11:06 -04:00
Rapptz 7f0db1f35a Return early if no kwargs are given to GuildChannel.move 2021-03-30 03:54:58 -04:00
Rapptz a30ad6acf2 Ignore moving category channels to another category 2021-03-30 03:51:06 -04:00
Rapptz b850c9cd5d Add GuildChannel.move helper method to help with moving channels
Moving channels is seen as a complicated task, so hopefully this
abstracts a lot of it for users. There is no bulk move helper yet
since I'm unsure how the API for that should be.
2021-03-30 03:21:09 -04:00
Rapptz 862d509d2e [commands] Add support for stripping whitespace after the prefix
This is configured with the strip_after_prefix option in `Bot.__init__`
2021-03-28 21:21:09 -04:00
Rapptz c4c2cbf6d2 [commands] Remove nullability from help command implementation
Fixes #5154
2021-03-28 18:51:58 -04:00
Rapptz 4aee7fed5d [commands] Only remove top level commands on cog load failure 2021-03-28 18:35:59 -04:00
Rapptz 8657edfc99 Fallback to empty string for unavailable guild __str__ 2021-03-25 09:11:00 -04:00
Rapptz 5cb5126548 Make Attachment hashable and castable to str 2021-03-25 09:08:22 -04:00
Rapptz 1c8d1b0289 Recreate aiohttp.FormData objects during request retries
Fixes #6531
2021-03-24 08:50:34 -04:00
Rapptz 0b19fabbf0 Remove deprecated uses of about 2021-03-24 08:36:53 -04:00
Rapptz 9af99d2634 Update issue template 2021-03-24 08:35:41 -04:00
Rapptz 4c4d75dc29 Disallow empty sequences in Guild.query_members user_id parameter 2021-02-28 23:56:14 -05:00
Rapptz abfc07f968 Fix up previous PR mistake with intentional backslashes 2021-02-21 07:35:31 -05:00
Rapptz a8f44174ba Add Permissions.use_slash_commands 2021-02-18 07:28:37 -05:00
Rapptz 272339d5e6 Add support for the new permission serialization scheme. 2021-02-18 07:26:20 -05:00
Rapptz 88c23125ff Allow CustomActivity emoji to be constructed as documented.
Fix #4049
2021-02-18 00:43:19 -05:00
Rapptz 0cd1a88316 Clarify Message.nonce documentation
Fix #2451
2021-02-18 00:23:58 -05:00
Rapptz a0404807d5 [commands] Add support for rgb function in ColourConverter
This also adds support for 3 digit hex.

Fixes #6374
2021-02-07 07:18:56 -05:00
Rapptz adae90400f Some grammar nits 2021-02-02 03:57:09 -05:00
Rapptz 3030f8ce0d Fix some validation errors with the template yaml 2021-02-02 03:49:06 -05:00
Rapptz 82edc252e0 Switch issue templates to use the new issue forms alpha 2021-02-02 03:46:20 -05:00
Rapptz 30c06bc55f Always inject the HTML builder even in RTD builds 2021-02-02 03:01:12 -05:00
Rapptz 61884dd9ac Use member provided data in typing_start event if not in cache
Apparently Discord had this all along.

ref: #5965, #5983
2021-01-24 05:21:13 -05:00
Rapptz c5a44d8303 Version bump for development 2021-01-16 05:41:21 -05:00
Rapptz b9a99238e8 [commands] Add Command/Cog.has_error_handler
This allows querying the state without relying on internal undocumented
attributes.
2021-01-15 06:00:45 -05:00
Rapptz c09cf779a3 Fix tag references in builds 2021-01-08 04:39:24 -05:00
Rapptz 166f837693 Changelog fixes 2021-01-08 00:32:49 -05:00
Rapptz fc65526e9c Bump version to 1.6 2021-01-07 23:57:15 -05:00
Rapptz 50bc7a1523 Add changelog for v1.6 2021-01-07 23:57:15 -05:00
Rapptz 7c149312f0 Update copyright year in the documentation 2021-01-07 23:57:15 -05:00
Rapptz 442962596e Dispatch user updates if the global cache gets stale in update events 2021-01-07 23:57:14 -05:00
Rapptz 3a75816ba1 Support setting the preferred locale via Guild.edit
Fix #6267
2021-01-05 22:43:22 -05:00
Rapptz c793737e64 Fix search not working on mobile 2021-01-01 22:09:14 -05:00
Rapptz 5c868ed871 Fix SyntaxError from PR implementing presences in member querying 2021-01-01 09:37:47 -05:00
Rapptz 94f76e6394 Fix webhook state coercion leading to unexpected behaviour.
Fix #6220
2020-12-29 08:26:39 -05:00
Rapptz ef67b56fc6 Change highlight text colour on dark theme
Fix #6215
2020-12-26 20:49:26 -05:00
Rapptz b778171188 Fix 404 in search pages.
Fix #6210
2020-12-25 14:21:58 -05:00
Rapptz eb11079569 Document more guild features 2020-12-22 07:18:40 -05:00
Rapptz 66ede7c5a0 Fix search highlighting not working 2020-12-21 03:18:47 -05:00
Rapptz ede7b4762a Fix constructor colours being off in dark mode 2020-12-19 06:11:49 -05:00
Rapptz 674f414ae0 Add attributetable to WebhookMessage 2020-12-19 06:00:21 -05:00
Rapptz a534aeac5d [matrix] Flip collapsible arrow direction 2020-12-19 05:52:43 -05:00
Rapptz 9013e1d1a2 [tasks] Add missing attributetable to tasks 2020-12-19 00:51:59 -05:00
Rapptz 2a6ea3532b Rework index page to take less vertical space 2020-12-19 00:48:35 -05:00
Rapptz 17b49c5a46 [commands] Make documentation use new attributetable 2020-12-18 21:35:27 -05:00
Rapptz 4ef6d7ec1e Add missing attributetable to new classes 2020-12-18 21:35:27 -05:00
Rapptz 13dacb3994 Thicken admonition borders a little 2020-12-18 21:18:58 -05:00
Rapptz eba0aaa351 Fix collapsible sidebar not working 2020-12-18 21:18:57 -05:00
Rapptz 7cc95d9dac Use the constructed value in the settings 2020-12-18 21:18:57 -05:00
Rapptz 94cc151ebf Fix tooltips in settings and make strings translatable 2020-12-18 21:18:57 -05:00
Rapptz 1619043c4e Move setting load to DOMContentLoaded 2020-12-18 21:18:57 -05:00