mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix error message
This commit is contained in:
@ -105,7 +105,7 @@ export class SlashCommandClosure {
|
|||||||
for (const executor of this.executorList) {
|
for (const executor of this.executorList) {
|
||||||
if (executor instanceof SlashCommandClosureExecutor) {
|
if (executor instanceof SlashCommandClosureExecutor) {
|
||||||
const closure = this.scope.getVariable(executor.name);
|
const closure = this.scope.getVariable(executor.name);
|
||||||
if (!closure || !(closure instanceof SlashCommandClosure)) throw new Error(`${name} is not a closure.`);
|
if (!closure || !(closure instanceof SlashCommandClosure)) throw new Error(`${executor.name} is not a closure.`);
|
||||||
closure.scope.parent = this.scope;
|
closure.scope.parent = this.scope;
|
||||||
closure.providedArguments = executor.providedArguments;
|
closure.providedArguments = executor.providedArguments;
|
||||||
const result = await closure.execute();
|
const result = await closure.execute();
|
||||||
|
Reference in New Issue
Block a user