Integrated server-side chatPreprocessor.js with pmHandler.js

This commit is contained in:
rainbow napkin 2025-10-02 04:56:47 -04:00
parent ad3cdd38a3
commit 6f89f36fb8
3 changed files with 32 additions and 42 deletions

View file

@ -112,10 +112,10 @@ class chatPreprocessor{
//if it isn't just an exclimation point, and we have a real command
if(commandObj.argumentArray != null){
//If the command processor knows what to do with whatever the fuck the user sent us
if(this.commandProcessor[commandObj.argumentArray[0].toLowerCase()] != null){
if(this.commandProcessor != null && this.commandProcessor[commandObj.argumentArray[0].toLowerCase()] != null){
//Process the command and use the return value to set the sendflag (true if command valid)
commandObj.sendFlag = await this.commandProcessor[commandObj.argumentArray[0].toLowerCase()](commandObj, this);
}else{
}else if(this.tokebot != null){
//Process as toke command if we didnt get a match from the standard server-side command processor
commandObj.sendFlag = await this.tokebot.tokeProcessor(commandObj);
}