You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attachment converter does not capture attachments for VAR_POSITIONAL parameters
Reproduction Steps
Create a command with a VAR_POSITIONAL (aka *args) parameter with the discord.Attachment typehint, then run it.
Minimal Reproducible Code
bot=commands.Bot(command_prefix=["--"], intents=discord.Intents.all())
@bot.command()asyncdeffoo(ctx, *imgs: discord.Attachment):
awaitctx.send(ctx.message.attachments)
awaitctx.send(imgs) # always shows an empty tuple no matter the state of .attachmentsbot.run("<TOKEN>")
Expected Results
To receive a tuple of attached files in the parameter, OR for an error of some form to be raised to indicate that Attachment is an invalid converter type for VAR_POSITIONAL parameters
Actual Results
Parameter is accepted as valid by the command framework but is always an empty tuple
Intents
discord.Intents.all()
System Information
Python v3.12.2-final
discord.py v2.4.0-alpha
discord.py metadata: v2.4.0a5006+g8fd1fd80
aiohttp v3.9.5
system info: Windows 11 10.0.22621
Checklist
I have searched the open issues for duplicates.
I have shown the entire traceback, if possible.
I have removed my token from display, if visible.
Additional Context
Other parameter types, as well as commands.Greedy, still work as expected.
The text was updated successfully, but these errors were encountered:
Summary
Attachment converter does not capture attachments for VAR_POSITIONAL parameters
Reproduction Steps
Create a command with a VAR_POSITIONAL (aka
*args
) parameter with thediscord.Attachment
typehint, then run it.Minimal Reproducible Code
Expected Results
To receive a tuple of attached files in the parameter, OR for an error of some form to be raised to indicate that Attachment is an invalid converter type for VAR_POSITIONAL parameters
Actual Results
Parameter is accepted as valid by the command framework but is always an empty tuple
Intents
discord.Intents.all()
System Information
Checklist
Additional Context
Other parameter types, as well as
commands.Greedy
, still work as expected.The text was updated successfully, but these errors were encountered: