From f75ebb59738cda203fd6b6e48a8f57e51248d247 Mon Sep 17 00:00:00 2001 From: An Orbit <68935009+orbit-loona@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:09:43 -0400 Subject: [PATCH] primitive | batch syntax --- mods/prompt.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mods/prompt.js b/mods/prompt.js index b4b45ec8..b95e14e2 100644 --- a/mods/prompt.js +++ b/mods/prompt.js @@ -378,6 +378,21 @@ ${eightSpaces}Example full decor definition: bird:0.04:10:#FF0000,#FFFF00,#00FF0 console.log("Prompt canceled"); return false; }; + //console.log(inputText); + if(inputText.includes("|")) { + var commands = inputText.split("|"); + var results = []; results.length = commands.length; + for(var cmdi in commands) { + commands[cmdi] = commands[cmdi].trim(); + try { + results[cmdi] = funniPrompt(commands[cmdi]); + } catch(error) { + results[cmdi] = error; + }; + }; + console.log(results); + return results; + }; inputAsArray = inputText.split(" "); var firstItem = inputAsArray[0];