Added the replace parameter to the app.js

This commit is contained in:
Mathias Wagner 2023-06-02 14:29:19 +02:00
parent fca4b373a2
commit 36f3be0385
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -67,6 +67,12 @@ module.exports = (io, socket) => {
if (msg?.data[key] !== value) return;
}
if (item.replace) {
Object.keys(item.replace).map((key) => {
item.command = item.command.replace(new RegExp(`{${key}}`, "g"), item.replace[key]());
});
}
queue.push({...item, step: index+1});
if (item.description)