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

feat: ArgumentComsumer return result with err #441

Conversation

smuu
Copy link
Contributor

@smuu smuu commented Jan 1, 2025

Description

With the ability to return errors with the ArgumentConsumer, we can provide proper feedback to the command sender.
For example, when specifying an invalid player, we can provide a proper message instead of sending a message that the command syntax is incorrect.

Testing

Checklist

Things need to be done before this Pull Request can be merged.

  • Code is well-formatted and adheres to project style guidelines: cargo fmt
  • Code does not produce any clippy warnings: cargo clippy
  • All unit tests pass: cargo test
  • I added new unit tests, so other people don't accidentally break my code by changing other parts of the codebase. How?

@Snowiiii
Copy link
Member

Snowiiii commented Jan 1, 2025

Found out that /gamemode invalid_gamemode and an empty player (e.g. /kill does produce and "Internal Error"

@smuu
Copy link
Contributor Author

smuu commented Jan 2, 2025

Thinking about this again, we don't need this (yet)

@smuu smuu closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants