serenity-rs / poise

Discord bot command framework for serenity, with advanced features like edit tracking and flexible argument parsing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add serenity's `CommandId` to slash commands created with poise. To reference it in the help menu

asibahi opened this issue · comments

Discord allows everyone to type command snowflakes, as shown here. Serenity's CommandId type is the COMMAND_ID being used here, as far as I can tell.

Currently in poise when registering commands this info is discarded and not stored in the Framework. So poise's Command objects lacks this info, so I cannot have my commands linked from the help menu.

tl;dr : this would be nice if I could do it automatically from the help menu. Even if just as a cmd.format_for_discord() method on poise::Command.
image

The framework is immutable after its setup and the framework setup function doesn't exist on the serenity-next branch anymore as we migrate. Even still, I'm not sure how much can be mutated there, if at all.

Registers on startup are optional, handled by the user, storing the result in the framework may be challenging, but I'm not sure if this is entirely out of scope.