From e0e89959b9b2e9c6a15ba1425df40f0e8f25239c Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Tue, 2 Apr 2024 09:46:53 -0400 Subject: [PATCH] fix error message --- public/scripts/slash-commands/SlashCommandClosure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/slash-commands/SlashCommandClosure.js b/public/scripts/slash-commands/SlashCommandClosure.js index 00ae3cef8..5d96a51fb 100644 --- a/public/scripts/slash-commands/SlashCommandClosure.js +++ b/public/scripts/slash-commands/SlashCommandClosure.js @@ -105,7 +105,7 @@ export class SlashCommandClosure { for (const executor of this.executorList) { if (executor instanceof SlashCommandClosureExecutor) { 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.providedArguments = executor.providedArguments; const result = await closure.execute();