-
-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ext.commands): required is False although default is None #2282
fix(ext.commands): required is False although default is None #2282
Conversation
I don't understand, there's no way |
Yeah same thought here. Closing it as invalid. |
@Lulalaby @Dorukyum is this code valid? @bot.bridge_command()
async def test_no_default(ctx, text: Option(str, required=False)):
await ctx.respond(text or "hello") I think it should work but it doesn't because the default is None. UPDATE: BTW, it works as a slash command, but not as prefix command. Hence the inconsistency. |
The issue seems to be that it's returning
|
Isn't that how it's always been? |
Yes, but it didn't (and still doesn't) work for bridge commands invoked via prefix. This PR fixes the issue. |
But if required is |
Yes. Because of this the command above doesn't work without the argument. By the way, looks like |
Missclick 😅 |
My bad, I understand the pr now and I think you're right. We can't do |
Co-authored-by: Dorukyum <[email protected]> Signed-off-by: Krutyi-4el <[email protected]>
Summary
#2089 (comment)
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.