Commit Graph
3259 Commits
Author SHA1 Message Date
Nadir ChowdhuryandGitHub 0903ea949f Add typings for Message, Emoji, and Member 2021-04-08 01:51:42 -04:00
Rapptz e895a53713 [commands] Add StageChannelConverter to documentation 2021-04-08 00:44:47 -04:00
pikaninjaandGitHub 1c553f51fb [commands] Use has_error_handler instead in command_error 2021-04-07 23:42:52 -04:00
KallumandGitHub cc6edccc0c Make the bot template use f-strings over str.format 2021-04-07 21:38:01 -04:00
Nadir ChowdhuryandGitHub f8bea3bb05 Fix inaccuracies with AsyncIterator typings 2021-04-07 20:28:12 -04:00
Nadir ChowdhuryandGitHub 87e64dff06 Add typings for channels and PartialUser 2021-04-07 07:56:56 -04:00
Nadir ChowdhuryandGitHub 83fe98c20d Add typing for flags 2021-04-07 07:55:55 -04:00
Sebastian LawandGitHub 4c72137e43 [docs] add note for possible Embed.type strings 2021-04-07 07:17:57 -04:00
Nadir ChowdhuryandGitHub a43ea5c550 Fix regression in Activity relying on try_enum 2021-04-07 07:17:04 -04:00
Sebastian LawandGitHub ece7064e64 [docs] add label to basic converters section 2021-04-07 07:12:52 -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
Shun TannaiandGitHub bda3afcad7 [commands] Update Converter list in ext.commands introduction 2021-04-07 03:20:35 -04:00
Rapptz f80b8d3f5d [commands] Only replace annotation if one was given 2021-04-07 03:17:36 -04:00
Nadir ChowdhuryandGitHub 89456022cf Add __all__ to remaining modules 2021-04-07 02:30:32 -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
Steve CandGitHub 3c9aed9102 Fix AttributeError on HTTPClient.send_file to be send_files 2021-04-07 00:01:48 -04:00
Nadir ChowdhuryandGitHub 7f0a398c1e Use format_map instead of format for Route.url 2021-04-06 23:44:44 -04:00
ZomatreeandGitHub ad68a1d04e Add source_channel and source_guild to Webhook 2021-04-06 23:31:18 -04:00
Nadir ChowdhuryandGitHub 9f0c701a7a use typing.AsyncIterator for iterators 2021-04-06 23:26:31 -04:00
Nadir ChowdhuryandGitHub 7a34de1570 [commands] Use typing.get_type_hints to resolve ForwardRefs 2021-04-06 23:24:23 -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
ToxicKidzandGitHub 0efb720cec [commands] Fix AttributeError for classes missing convert attribute 2021-04-05 23:12:27 -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
Michael HandGitHub 682b73abb6 [commands] Address incorrect use of subclass (from type perspective)
This is a follow up from #6641
2021-04-05 21:39:17 -04:00
Michael HandGitHub d0476e98df [commands] Add more type information to public API of converters 2021-04-05 21:31:28 -04:00
Nadir ChowdhuryandGitHub 686a54eb10 Remove 3.6 check for loop.shutdown_asyncgens() 2021-04-05 20:31:45 -04:00
Nadir ChowdhuryandGitHub 2ff24a27b5 Use asyncio.create_task over asyncio.ensure_future 2021-04-05 20:31:03 -04:00
Nadir ChowdhuryandGitHub 7a7c4b4d62 Remove fail-safe for retrieving all tasks 2021-04-05 20:29:37 -04:00
Michael HandGitHub 83bd76504a Use covariant TypeVar for protocol 2021-04-05 20:29:15 -04:00
Michael HandGitHub fbe6e2f520 [commands] Fix @classmethod converters 2021-04-05 20:25:23 -04:00
LoganandGitHub 3abb2fde56 Fix versionadded not showing in docs for Attachment.content_type 2021-04-05 20:24:04 -04:00
VaskelandGitHub 88be8cc5be Remove deprecated client methods 2021-04-05 17:44:05 -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