-
Notifications
You must be signed in to change notification settings - Fork 116
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
context_menu_command
doesn't work for subcommands
#178
Comments
context_menu_command
doesn't work for subcommands
Thank you for the report Lines 6 to 32 in 5d02b87
I think the problem is here - subcommands are only traversed when the interaction has a subcommand too |
And thank you for this really great crate! So can I fix it in my code or do I have to wait for a release? I'd like to make a PR with a fix but I'm really unfamiliar to Rust macros... |
This is a bug in poise, not your crate, but you can work around the bug by having two seperate functions for the slash version and the context menu version of your user / Get avatar command, where the context menu version is registered in poise as top-level, so that it doesn't hit this context menu subcommand bug |
That's kind of what I have atm, I'll keep it that way for now, thank's anyway! |
Am I right in thinking this allows for a dropdown menu instead of a single button for a context menu action? This would be incredibly useful Or is it just that you can have it be a context menu command as normal but also have it as a subcommand of a slash command |
The
context_menu_command
macro arguments doesn't work withsubcommands
Maybe I'm doing it wrong, but this is the code I have :
/picture user
and/picture server
work fine when invoking them via slash commands, but when I try to invokeGet avatar
, I get no reponse (timeout) and the function is never called (but is still registered as a context menu command!)The text was updated successfully, but these errors were encountered: