-
Notifications
You must be signed in to change notification settings - Fork 113
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
feature request: converters with poise context #163
Comments
I attempted something similar before, I think it could be made to work. For motivation purposes and curiosity - what would you need a string-to-command converter for? |
for e.g. custom help command, you can simply pass Command as a parameter. I know you can pass String and then get command by its name/aliases/etc. but this would be simpler. |
Yeah, that's the only use I can think of either. You can see my attempt from two years ago here in this todo card and this commit |
Currently, we can only use serenity::Context in ArgumentConvert, PopArgument and SlashArgument, because all these traits are imported from serenity.
But what if we want to make a string-to-command converter? We are unable to use the ctx.framework() method in any way to get the command. The only solution would be to export the commands variable from other file, which is not a good solution.
Now the trait looks like this:
How about creating a custom implementation, with Poise context support? It would be very helpful.
The text was updated successfully, but these errors were encountered: