remove SlashCommandClosureExecutor

has long since been replaced with /:
This commit is contained in:
LenAnderson 2024-06-24 07:51:44 -04:00
parent 45eeb63a0d
commit 914e8eb4cf
2 changed files with 1 additions and 16 deletions

View File

@ -3,7 +3,6 @@ import { delay, escapeRegex } from '../utils.js';
import { SlashCommand } from './SlashCommand.js'; import { SlashCommand } from './SlashCommand.js';
import { SlashCommandAbortController } from './SlashCommandAbortController.js'; import { SlashCommandAbortController } from './SlashCommandAbortController.js';
import { SlashCommandBreakPoint } from './SlashCommandBreakPoint.js'; import { SlashCommandBreakPoint } from './SlashCommandBreakPoint.js';
import { SlashCommandClosureExecutor } from './SlashCommandClosureExecutor.js';
import { SlashCommandClosureResult } from './SlashCommandClosureResult.js'; import { SlashCommandClosureResult } from './SlashCommandClosureResult.js';
import { SlashCommandDebugController } from './SlashCommandDebugController.js'; import { SlashCommandDebugController } from './SlashCommandDebugController.js';
import { SlashCommandExecutor } from './SlashCommandExecutor.js'; import { SlashCommandExecutor } from './SlashCommandExecutor.js';
@ -233,14 +232,7 @@ export class SlashCommandClosure {
this.onProgress?.(done, this.commandCount); this.onProgress?.(done, this.commandCount);
this.debugController?.setExecutor(executor); this.debugController?.setExecutor(executor);
yield executor; yield executor;
if (executor instanceof SlashCommandClosureExecutor) { if (executor instanceof SlashCommandBreakPoint) {
const closure = this.scope.getVariable(executor.name);
if (!closure || !(closure instanceof SlashCommandClosure)) throw new Error(`${executor.name} is not a closure.`);
closure.scope.parent = this.scope;
closure.providedArgumentList = executor.providedArgumentList;
const result = await closure.execute();
this.scope.pipe = result.pipe;
} else if (executor instanceof SlashCommandBreakPoint) {
// no execution for breakpoints, just raise counter // no execution for breakpoints, just raise counter
done++; done++;
yield executor; yield executor;

View File

@ -1,7 +0,0 @@
import { SlashCommandNamedArgumentAssignment } from './SlashCommandNamedArgumentAssignment.js';
export class SlashCommandClosureExecutor {
/**@type {String}*/ name = '';
// @ts-ignore
/**@type {SlashCommandNamedArgumentAssignment[]}*/ providedArgumentList = [];
}