MCPcopy Create free account
hub / github.com/Botloader/botloader / run

Method run

components/runtime/src/ts/script.ts:372–395  ·  view source on GitHub ↗

* @internal

()

Source from the content-addressed store, hash-verified

370 * @internal
371 */
372 run() {
373 if (this.runCalled) {
374 throw new Error("run already called");
375 }
376
377 this.runCalled = true;
378
379 const [cmds, groups] = this.genCommandsBinding();
380
381 OpWrappers.scriptStarted({
382 description: this.description,
383 commands: cmds,
384 commandGroups: groups,
385 scriptId: this.scriptId,
386 intervalTimers: this.intervalTimers.map(inner => inner.timer),
387 taskBuckets: this.taskHandlers,
388 pluginId: this.pluginId,
389 settings: this.settings.toInternalOptions()
390 });
391
392 EventSystem.registerEventMuxer(this.events);
393
394 this.events.on("BOTLOADER_INTERVAL_TIMER_FIRED", this.handleIntervalEvent.bind(this));
395 }
396
397 private async handleIntervalEvent(evt: Internal.IntervalTimerEvent) {
398 const timer = this.intervalTimers.find(

Callers

nothing calls this directly

Calls 3

genCommandsBindingMethod · 0.95
toInternalOptionsMethod · 0.80
onMethod · 0.45

Tested by

no test coverage detected