Skip to content
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

Argument attributes. #13

Open
Tylertron1998 opened this issue Jan 8, 2021 · 0 comments
Open

Argument attributes. #13

Tylertron1998 opened this issue Jan 8, 2021 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Tylertron1998
Copy link
Owner

Tylertron1998 commented Jan 8, 2021

Some attributes are going to be needed for arguments. Some I can think of, off the top of my head are:

  • [Rest] simple really, used along side any type, everything after would be parsed as that type (i.e. a command of int, [rest] user would parse a single int, and infinite users (up to the amount provided)
  • [Range(int min, int max)] specify a range for arguments. How do we give this to a resolver? How about custom types - i.e. datetime? Do we use an object? We don't have generic attributes yet...
  • [ExecutingMessage] when paired along with an argument of type Message, it informs the handler that actually, we want the messaged used to execute the command - NOT a supplied message.
  • [Precondition(Type conditionType)] this is an interesting one. We could in theory have preconditions for argument parsers - maybe even ones that take in functions. This could allow for finer control over how the argument is handled, outside of the command (i.e. you could make one that doesn't even bother running the command if the Users' name begins with a 'T')

Happy if anyone can suggest anymore - these are the most useful I see now, however.

@Tylertron1998 Tylertron1998 added enhancement New feature or request help wanted Extra attention is needed labels Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant