step into closures from elsewhere (draft)

This commit is contained in:
LenAnderson
2024-06-27 11:49:12 -04:00
parent aefa31a912
commit 173c5ef53e
5 changed files with 39 additions and 0 deletions

View File

@ -1737,6 +1737,10 @@ async function runCallback(args, name) {
throw new Error(`"${name}" is not callable.`);
}
closure.scope.parent = scope;
if (args._debugController && !closure.debugController) {
closure.debugController = args._debugController;
}
while (closure.providedArgumentList.pop());
closure.argumentList.forEach(arg => {
if (Object.keys(args).includes(arg.name)) {
const providedArg = new SlashCommandNamedArgumentAssignment();