4259 Commits

Author SHA1 Message Date
Rapptz
cc3e714338 Fix typo in documentation and mention name kwarg interaction 2022-05-11 03:20:57 -04:00
Rapptz
15ceca1e63 [commands] Add support for FlagConverter in hybrid commands
This works by unpacking and repacking the flag arguments in a flag.
If an unsupported type annotation is found then it will error at
definition time.
2022-05-11 03:15:57 -04:00
xCirno
1607b6978b
Add widget_enabled attribute to Guild 2022-05-10 22:59:22 -04:00
Waylander
23065db804
Update minimum aiohttp dependency 2022-05-10 22:52:15 -04:00
Rapptz
d319539edb [commands] Fix broken examples in commands.param documentation 2022-05-09 18:15:31 -04:00
Rapptz
40176bb71b Fix bound method autocomplete callbacks not working
This also adds some regression tests
2022-05-09 17:24:48 -04:00
Rapptz
b2929513cc Update modal example for latest changes 2022-05-08 04:46:40 -04:00
I. Ahmad
96bada03f4
Add support for application tags and install params 2022-05-08 02:16:16 -04:00
Rapptz
c779e34fa0 Use explicit UTF-8 encoding in SyncWebhook 2022-05-08 00:13:06 -04:00
Server Bot
902aa245a4
Swap order of arguments in Modal.on_error 2022-05-06 20:16:42 -04:00
Rapptz
bd3ce597e1 [commands] Fix app command children not being copied in HybridGroup
This degenerate case is only triggered inside cogs when using the
app_command property to define commands, such as this:

    class X(commands.Cog):
        @commands.hybrid_group()
        async def foo(self, ctx):
            ...

        @foo.app_command.command()
        async def bar(self, interaction):
            ...
2022-05-06 09:02:49 -04:00
Rapptz
85ad33eb35 Fix formatting issue in webhook 2022-05-06 09:02:49 -04:00
Rapptz
4dd5cc2bc9 Pass proxy information to interactions and webhooks
Fix #7918
2022-05-05 12:07:09 -04:00
Rapptz
1df3ed861c Fix broken HTTPClient.recreate code to actually clear session 2022-05-05 11:42:50 -04:00
Rapptz
0502c6a0d2 Fix two styling nits with fmt: off 2022-05-05 11:35:26 -04:00
Rapptz
fbd57ffa58 Add FAQ entry for disabling all items in a View on timeout 2022-05-05 08:52:24 -04:00
Rapptz
2bfbd1a979 Prefer code-block directive over :: in faq.rst 2022-05-05 08:52:24 -04:00
xCirno
6901907b69
[commands] Add seealso directive in functions referencing checks 2022-05-05 06:21:52 -04:00
z03h
bd727d2b0c
Add edit and delete methods to AppCommand 2022-05-05 06:20:55 -04:00
Rapptz
9793fba338 [commands] Add support for discord.Attachment converters 2022-05-05 01:54:59 -04:00
Rapptz
d8846570ae Remove unnecessary type ignore
Despite this except branch is no longer guarded, the exceptional
case could still happen if an Object is passed or if a future channel
type leads to breakage
2022-05-05 01:46:19 -04:00
Rapptz
ccc737eb07 [commands] Add support for with_app_command in hybrid commands
This allows the user to make a text-only command without it registering
as an application command
2022-05-05 01:46:19 -04:00
I. Ahmad
e3ea4706f9
[types] Remove auto archive duration related guild features 2022-05-05 01:46:09 -04:00
Jonah Lawrence
1451074d66
Return embed from clear_fields and remove_field 2022-05-04 23:53:50 -04:00
Var
7b65be9d25
[commands] Fix broken None reference
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-05-04 23:34:49 -04:00
Rapptz
b9b6dc960f Add aiohttp[speedups] dependencies to discord.py[speed] 2022-05-04 07:09:45 -04:00
Rapptz
d56f5150fa Fix oversight of edit parameters not being keyword only 2022-05-04 05:02:42 -04:00
Rapptz
4733a499a5 Fix documentation build for Client.get_partial_messageable 2022-05-03 11:02:12 -04:00
Rapptz
b7ac0a02ca Fix documentation of PartialMessageable.jump_url 2022-05-03 10:57:51 -04:00
Rapptz
c22b6dc2cd Add guild property to DMChannel, GroupChannel, and PartialMessageable
This improves generic duck typing programming by allowing narrowing
the types by just checking for a None guild attribute.
2022-05-03 10:55:29 -04:00
Rapptz
8699d2139a Improve generic duck type programming with PartialMessageable
This adds jump_url, permissions_for, and created_at. Luckily, most
cases of this type being constructed already have the guild_id at
creation time.
2022-05-03 10:49:52 -04:00
xCirno
e9c7c09ebf
Add guild avatar to on_member_update docs 2022-05-03 09:44:12 -04:00
Rapptz
eee65ac39b [commands] Pass permissions v2 information to HybridGroup 2022-05-02 19:08:25 -04:00
Michael H
d0667d08e3
[commands] Fix typing of check/check_any
This changes the type information of check decorators to return a
protocol representing that the decorator leaves the underlying object
unchanged while having a .predicate attribute.

resolves #7949
2022-05-02 18:54:49 -04:00
Bryan Forbes
4a73de946a
Change dm_permissons to dm_permission 2022-05-02 18:25:42 -04:00
Rapptz
79d34fbe78 Change Select.type to use a Literal 2022-05-02 08:22:25 -04:00
Rapptz
6771f3dc99 Remove extraneous channel assignment 2022-05-02 06:54:54 -04:00
NextChai
300fb0411e
Replace trigger_typing with awaiting typing context manager 2022-05-02 04:36:18 -04:00
z03h
9deac84eac
Fix wrong variable being returned in audit logs 2022-05-02 04:34:01 -04:00
Rapptz
66c48c2d0e Add support for checks with autocomplete
Fixes #7969
2022-05-01 20:21:32 -04:00
Rapptz
d774b4ac7a Add back tuple __slots__ for AllChannels 2022-05-01 20:10:56 -04:00
Rapptz
11d4dfd8fa Update app_commands validation regex to match newest documentation 2022-05-01 20:01:46 -04:00
Rapptz
ca33824ba2 Change AllChannels.id into a property rather than a slot 2022-05-01 19:41:45 -04:00
Rapptz
7f210c90f4 Return a named tuple with message from ForumChannel.create_thread 2022-05-01 19:32:11 -04:00
Rapptz
a704666ce3 Add support for app_commands decorators for Group subclasses 2022-05-01 19:10:59 -04:00
Rapptz
e8a2eeea06 [commands] Rename Cog.app_command_group to Cog.app_command
This allows it to be consistent with hybrid commands
2022-05-01 19:04:53 -04:00
z03h
619bc50e5d
Add application command permissions to audit log 2022-05-01 18:59:57 -04:00
Rapptz
5f0cf58b2e Revert "Run parent command checks before calling autocomplete callback"
This reverts commit 5e98626d41e6e39f82b9fbdc7a0723311fe5751b.

Fix #7978
2022-05-01 18:54:22 -04:00
Rapptz
0551214be1 [commands] Properly set default guilds for group to None instead of [] 2022-05-01 15:44:18 -04:00
Rapptz
e873b8294a [commands] Properly set group parent for hybrid commands in cogs 2022-05-01 15:01:30 -04:00