-
Notifications
You must be signed in to change notification settings - Fork 0
Modifying General
If you'd like to modify General code and better integrate it into something else, you may want to pay attention to the spots in code listed below:
The context of commands should hold metadata about the execution of the command. If you have a user-based system where multiple users could call a command, you may want to add a sender property. You should probably also change the sendMessage
and sendError
methods.
Keep in mind that various messages from commands and errors may make use of the newline character.
At that point, the sendMessage
and sendError
methods residing in CommandManager
may become obsolete. It's up to you whether or not they need to be kept.
Registration and execution of commands may need to be different in some use cases. You can either delegate to the CommandManager methods, or refer to the private processCommand
method in the command manager to see how you should try to reimplement command execution. The handleCommand
and completeCommand
methods, as well as processCommand
itself may become obsolete after reimplementation.