Added browser-side command parser and /high command.

This commit is contained in:
rainbow napkin 2024-12-08 08:18:30 -05:00
parent ff69762a1f
commit 77dc865022
4 changed files with 76 additions and 6 deletions

View file

@ -24,6 +24,9 @@ class chatBox{
//clickDragger object
this.clickDragger = new canopyUXUtils.clickDragger("#chat-panel-drag-handle", "#chat-panel-div");
//Preprocessor objects
this.commandPreprocessor = new commandPreprocessor(client);
this.chatPreprocessor = new chatPreprocessor();
//Element Nodes
@ -115,9 +118,9 @@ class chatBox{
this.resizeAspect();
}
async send(event){
send(event){
if((!event || !event.key || event.key == "Enter") && this.chatPrompt.value){
this.client.socket.emit("chatMessage",{msg: this.chatPrompt.value});
this.commandPreprocessor.preprocess(this.chatPrompt.value);
this.chatPrompt.value = "";
}
}