revert various fixes to get it working for myself
This commit is contained in:
2026-01-23 13:24:43 +00:00
parent b72fcaa426
commit 4a2925b141
4 changed files with 88 additions and 122 deletions

View File

@@ -6,14 +6,13 @@ import { promises as fs } from "fs";
network: "console",
message: _args.join(" "),
args: _args.slice(1),
channel: "#w0bm",
channel: "console",
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)
@@ -25,14 +24,11 @@ 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");
for (const t of trigger) {
console.log(`triggered > ${t.name} (${_e.message})`);
await t.f(_e);
}
} catch (err) {
console.log(`triggered > ${trigger[0].name} (${_e.message})`);
await trigger[0].f(_e);
} catch(err) {
console.error(err);
}
process.exit(0);
})();