serenity-rs / framework

The official command framework for bots written in Serenity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement command arguments

arqunis opened this issue · comments

The command arguments will be part of the #[command] macro to serve as a shorthand for parsing arguments manually. They will be provided in the signature of the function after the message parameter, appearing as additional parameters specific to the command. The type of the arguments will have to implement the Argument trait defined in arguments::Argument. If the type implements FromStr, an implementation is automatically generated.

What needs to be done:

  • Implement support in the #[command] macro by accepting an arbitrary amount of arguments after the message parameter
  • Implement optional arguments
  • Implement variadic ("rest") arguments