Firebot icon indicating copy to clipboard operation
Firebot copied to clipboard

Add missing "managers" and "helpers" to runRequest.modules for custom scripts

Open TheStaticMage opened this issue 3 months ago • 0 comments

Describe the solution you'd like This concerns the buildModules function in custom-script-helpers.js. The modules defined there include several Firebot "managers" and other modules to provide access to script builders. However, not all of these are present, either intentionally or just by oversight.

I would love to just request "all" ... but in order to keep this manageable, I would ask your specific consideration of these:

  • ChatRolesManager (src/backend/roles/chat-roles-manager.ts)
  • RoleHelpers (src/backend/roles/role-helpers.ts)
  • CommandCooldownManager (src/backend/chat/commands/command-cooldown-manager.ts)
  • CommandRunner (src/backend/chat/commands/command-runner.ts)

I haven't looked into the recent addition of the webhook proxy stuff, but having already written my own webhook proxy, I could imagine script authors possibly being interested in that as well.

I'm assuming this is straightforward to add, but if you want to mark this "Dev Approved" then I would be happy to add these myself (and also add to firebot-custom-script-types).

Additional context As a script developer, I would like to have all of these (within reason) added to the modules, because otherwise I need to copy/paste Firebot code into my script and maybe even look directly at Firebot data files. I appreciate this commit to provide a way to "reflect" events between the frontend and backend communicators, which can also help here. However, the cleanest solution, especially if Firebot is moving toward a more plugin-based architecture, would be to expose its internal APIs directly and consistently to folks who may be developing those plugins.

TheStaticMage avatar Sep 15 '25 04:09 TheStaticMage