add exclamation commands
This commit is contained in:
parent
16738d322b
commit
5e58deb712
1 changed files with 7 additions and 1 deletions
8
index.js
8
index.js
|
@ -59,8 +59,14 @@ app.post('/', async function (req, res) {
|
||||||
|
|
||||||
let msgs = req.body.data.split('\n');
|
let msgs = req.body.data.split('\n');
|
||||||
|
|
||||||
|
let msg = msgs[0];
|
||||||
|
|
||||||
|
if (msg.startsWith('!')) {
|
||||||
|
msg = `/${msg.slice(1)}`;
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(async function () {
|
setTimeout(async function () {
|
||||||
sessions[id].stdin.write(msgs[0] + '\n');
|
sessions[id].stdin.write(msg + '\n');
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue