More work decoupling chatPreprocessor.js from chatHandler.js

This commit is contained in:
rainbow napkin 2025-10-02 04:05:13 -04:00
parent 0ed1c0dd89
commit ad3cdd38a3
2 changed files with 3 additions and 8 deletions

View file

@ -45,7 +45,6 @@ class chatHandler{
* Child Command Pre-Processor Object * Child Command Pre-Processor Object
*/ */
this.chatPreprocessor = new chatPreprocessor( this.chatPreprocessor = new chatPreprocessor(
server,
new commandProcessor(server, this), new commandProcessor(server, this),
new tokebot(server, this) new tokebot(server, this)
); );

View file

@ -19,6 +19,7 @@ const validator = require('validator');//No express here, so regular validator i
//Local Imports //Local Imports
const linkUtils = require('../utils/linkUtils'); const linkUtils = require('../utils/linkUtils');
const commandProcessor = require('./channel/commandProcessor');
/** /**
* Class containing global server-side chat/command pre-processing logic * Class containing global server-side chat/command pre-processing logic
@ -26,14 +27,9 @@ const linkUtils = require('../utils/linkUtils');
class chatPreprocessor{ class chatPreprocessor{
/** /**
* Instantiates a commandPreprocessor object * Instantiates a commandPreprocessor object
* @param {channelManager} server - Parent Server Object * @param {commandProcessor} - Child Command Processor Object. Contains functions named after commands.
*/ */
constructor(server, commandProcessor, tokebot){ constructor(commandProcessor, tokebot){
/**
* Parent Server Object
*/
this.server = server;
/** /**
* Child Command Processor Object. Contains functions named after commands. * Child Command Processor Object. Contains functions named after commands.
*/ */