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

Create command results #42

Open
AbnerSquared opened this issue Oct 7, 2020 · 0 comments
Open

Create command results #42

AbnerSquared opened this issue Oct 7, 2020 · 0 comments
Labels
difficulty:hard This issue is a difficult one to fix, and may require several iterations before it can be resolved. priority:low This issue is queued to be worked on, but isn't important scope:core This issue focuses on the core Orikivo library. state:planned This issue is currently being planned out and/or designed. type:enhancement The issue is intended to introduce a new feature or change existing features.

Comments

@AbnerSquared
Copy link
Owner

All module classes should incorporate a base result class that contains more information than the base result that was specified. This would introduce a class called CommandResult, where it would contain details about the result of a command.

The class would be structured in this format:

  • The Command that was executed
  • The account that executed the command
  • If the command was a success or not
  • The raw input that was given for this command
  • The reason this command result failed, if any (can store exceptions as well, in a class called CommandError)
  • The TextBody that was provided for this command result, if any (if the command failed, this is null)

The CommandResult class can effectively be utilized to handle the updating of cooldowns and other scenarios. Likewise, The result of a command can be ignored entirely, and instead passed over to an event called CommandExecuted instead, which would be provided by a CommandService class (similar to Discord.Commands.CommandService). The event parameters would contain only a CommandResult.

@AbnerSquared AbnerSquared added type:enhancement The issue is intended to introduce a new feature or change existing features. priority:low This issue is queued to be worked on, but isn't important difficulty:hard This issue is a difficult one to fix, and may require several iterations before it can be resolved. state:planned This issue is currently being planned out and/or designed. scope:core This issue focuses on the core Orikivo library. labels Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:hard This issue is a difficult one to fix, and may require several iterations before it can be resolved. priority:low This issue is queued to be worked on, but isn't important scope:core This issue focuses on the core Orikivo library. state:planned This issue is currently being planned out and/or designed. type:enhancement The issue is intended to introduce a new feature or change existing features.
Projects
None yet
Development

No branches or pull requests

1 participant