-
-
Notifications
You must be signed in to change notification settings - Fork 482
Closed
Labels
Description
Summary
Commands in the SlashCommandGroup treat optional arguments as required
Reproduction Steps
- Create SlashCommandGroup and add command with optional parameter to it eg:
member: discord.Member = None
ormember: discord.Option(discord.Member) = None
- Go to any server where you can use this command
- Start writing a command and look at the parameters
Minimal Reproducible Code
test = SlashCommandGroup("test", "testing...")
@test.command(name='testcommand')
async def testcommand(
self,
ctx: discord.ApplicationContext,
member: discord.Member = None, # or discord.Option(discord.Member) = None
):
pass
Expected Results
Parameter should be marked as optional:
Actual Results
Parameter is marked as required:
Intents
discord.Intents.all()
System Information
- Python v3.8.13-final
- py-cord v2.0.0-candidate
- py-cord pkg_resources: v2.0.0rc1
- aiohttp v3.8.1
- system info: Linux 5.4.0-107-generic #121-Ubuntu SMP Thu Mar 24 16:04:27 UTC 2022
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
Previously no problem, after update to the latest version there are problems with it
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status