Regex: Add slash command input hook

Slash command output for sys and sendas commands were being formatted,
but add the ability for user placement to also apply to slash command
invocations.

Some slash commands will require an output hook, so add exclusions
inside the code itself.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-07-11 12:11:54 -04:00
parent f253286981
commit bd7d4beab5
5 changed files with 45 additions and 29 deletions

View File

@@ -201,6 +201,16 @@ function migrateSettings() {
performSave = true;
}
// Old system and sendas placement migration
// 4 - sendAs
if (script.placement.includes(4)) {
script.placement = script.placement.length === 1 ?
[regex_placement.SLASH_COMMAND] :
script.placement = script.placement.filter((e) => e !== 4);
performSave = true;
}
});
if (performSave) {