fix error message
This commit is contained in:
parent
cba2140152
commit
e0e89959b9
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue