-
Notifications
You must be signed in to change notification settings - Fork 118
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
Support Result as parameter type #177
Comments
Regarding the question: poise uses serenity's ArgumentConvert trait to convert strings into Discord model types. Poise adds a few specialized implementations beyond that for primitive types |
Btw, the original intended way was to set a command-specific on_error handler ( |
Is there a use case that's not satisfied with a command-specific |
I do agree that it'd be a pretty neat, and more or less "obvious" API to support having commands take |
I agree, it would fit into the existing API very well Implementation may turn out to be quite complicated the way the code is currently structured (or maybe not - I haven't tried), which is why I labeled this as "potentially messy" |
question
I'm curious about how does the the auto converter in commands arguments work, for example:
message: Option<Message>
is really impressive that can deal with both Message ID and Message Link,but I didn't find such methods in the doc
feature request
It start from a issue of the converter mentioned above, when the bot receive some unconvertable input (like inaccessible or invalid Message ID),
It will directly call
ctx.say
to handle the error, which came from, I tried to look into the source but I'm not good enough to understand them
So I wonder, like we can wrap type in
Option
to make it optional, is it possible to add such feature that wrap withResult
so we can handle the potential convert error in command?The text was updated successfully, but these errors were encountered: