feat: rework commands and fix bugs
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
export class CommandResponseError extends Error {
|
||||
constructor(message) {
|
||||
super(message);
|
||||
this.name = 'CommandResponseError';
|
||||
}
|
||||
|
||||
getRawMessage() {
|
||||
throw new Error('getRawMessage() must be implemented by subclasses of CommandResponseError');
|
||||
}
|
||||
|
||||
sendTo(source) {
|
||||
source.sendMessage(this.getRawMessage());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user