addon-operator icon indicating copy to clipboard operation
addon-operator copied to clipboard

Send events at module state change

Open miklezzzz opened this issue 1 year ago • 0 comments

Overview

Following changes:

  • Two new module events were added: ModuleStateChanged and ModuleConfig changed;
  • Modules got a new state field enabledScriptResults that contains the result of running the enabled script of a module. It comes in handy when we need to know if a module was disabled by its script or something else;
  • Modules can "export" their hooks' statuses via a new method;
  • Module manager got several new methods which can be used to alter a module and send a relevant event over a notification channel (like setting a module last error and updating hooks' statuses);
  • Module manager can be set to use a pre-created notification channel.

What this PR does / why we need it

This PR provides some additional calls that can be used to provide a better view of what and when is happening to modules of the operator.

Special notes for your reviewer

miklezzzz avatar Mar 19 '24 09:03 miklezzzz