fix /abort toasts in /while
This commit is contained in:
parent
89de668241
commit
1f18694aa6
|
@ -342,13 +342,16 @@ async function whileCallback(args, value) {
|
||||||
if (result && command) {
|
if (result && command) {
|
||||||
if (command instanceof SlashCommandClosure) {
|
if (command instanceof SlashCommandClosure) {
|
||||||
commandResult = await command.execute();
|
commandResult = await command.execute();
|
||||||
|
// don't suppress potentially loud /abort (need to bubble up to executeSlashCommandsWithOptions for toast)
|
||||||
|
if (commandResult.isAborted) break;
|
||||||
} else {
|
} else {
|
||||||
commandResult = await executeSubCommands(command, args._scope, args._parserFlags, args._abortController);
|
commandResult = await executeSubCommands(command, args._scope, args._parserFlags, args._abortController);
|
||||||
}
|
if (commandResult.isAborted) {
|
||||||
|
// abort toast (if loud) is already shown in subcommand execution,
|
||||||
if (commandResult.isAborted) {
|
// overwrite signal to quiet to prevent second toast from ancestor executions
|
||||||
args._abortController.abort(commandResult.abortReason, true);
|
args._abortController.signal.isQuiet = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue