fix error message

This commit is contained in:
LenAnderson 2024-04-02 09:46:53 -04:00
parent cba2140152
commit e0e89959b9
1 changed files with 1 additions and 1 deletions

View File

@ -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();