pass prev pipeResult through if result undefined

This commit is contained in:
LenAnderson 2023-12-07 18:28:58 +00:00
parent 5a719d635a
commit d52b5fb947
1 changed files with 4 additions and 0 deletions

View File

@ -1524,7 +1524,11 @@ async function executeSlashCommands(text, unescape = false) {
unnamedArg = unnamedArg.replace(/{{pipe}}/i, pipeResult || '');
}
let oldPipeResult = pipeResult;
pipeResult = await result.command.callback(result.args, unnamedArg);
if (pipeResult === undefined && oldPipeResult !== undefined) {
pipeResult = oldPipeResult;
}
if (result.command.interruptsGeneration) {
interrupt = true;