various fixes to get it working for myself

This commit is contained in:
eins
2026-01-23 08:44:46 +00:00
parent c198566474
commit a4f9c48e13
4 changed files with 122 additions and 88 deletions

View File

@@ -6,13 +6,14 @@ import { promises as fs } from "fs";
network: "console",
message: _args.join(" "),
args: _args.slice(1),
channel: "console",
channel: "#w0bm",
user: {
prefix: "console!console@console",
nick: "console",
username: "console",
account: "console"
},
raw: {},
reply: (...args) => console.log(args),
replyAction: (...args) => console.log(args),
replyNotice: (...args) => console.log(args)
@@ -24,11 +25,14 @@ import { promises as fs } from "fs";
)).filter(t => t[0].call.test(_e.message)).map(t => ({ name: t[0].name, f: t[0].f }));
try {
if(trigger.length === 0)
if (trigger.length === 0)
return console.error("no matches");
console.log(`triggered > ${trigger[0].name} (${_e.message})`);
await trigger[0].f(_e);
} catch(err) {
for (const t of trigger) {
console.log(`triggered > ${t.name} (${_e.message})`);
await t.f(_e);
}
} catch (err) {
console.error(err);
}
process.exit(0);
})();