-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Inconsistent default arguments in bridge commands #2089
Comments
Not sure when but it was fixed, but testing your code seems to work fine on latest (927f8ce). I also think modifying Option on import is a bit hacky, and the solution seems to just force people to use BridgeOption, so that's what I'll do. |
@Middledot your screenshot shows slash invocation, have you tried prefix invocation? Also, |
Thank you for pointing that out cuz I did not try that. Text commands don't process Option, so that's what it does now (#2256) For BridgeOption, I think we should expose it as the option class bridge commands should use instead of Option (#2252) but I want to wait on some internal stuff to sort out before merging |
…2256) * fix(ext.commands): command parsing bug #2089 * changelog: changelog * style(pre-commit): auto fixes from pre-commit.com hooks * Apple code suggestion Co-authored-by: Dorukyum <[email protected]> Signed-off-by: Middledot <[email protected]> --------- Signed-off-by: Middledot <[email protected]> Signed-off-by: Dorukyum <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dorukyum <[email protected]>
Excuse me, but pycord/discord/ext/commands/core.py Line 568 in a7f4adb
|
Summary
Bridge commands do not always handle default arguments in the same way
Reproduction Steps
Minimal Reproducible Code
Expected Results
I'd expect all three commands from the above code to produce the same output when the argument isn't provided, like it does for slash variants:
Actual Results
However, only the first one works:
Others are throwing an error:
Intents
None
System Information
Linux 4.14.232-QuicksilveR™-ReloadedOS-Edition #1 SMP PREEMPT Wed May 26 07:08:17 UTC 2021
Checklist
Additional Context
Not related to this particular issue, but I don't quite like how Option works with bridge commands. Relying on the order of imports is something very non-obvious, confusing and, iirc, not documented.
The text was updated successfully, but these errors were encountered: