This commit is contained in:
Flummi 2019-08-19 19:21:22 +00:00
parent 4c55065168
commit 677fc549b3

View File

@ -15,7 +15,7 @@ export default async bot => {
return [{
name: "message",
listener: "message",
f: (a, e = { ...a, ...parseArgs(a.message) }) => {
f: e => {
logger.info(`${e.network} -> ${e.channel} -> ${e.user.nick}: ${e.message}`);
const trigger = [...bot._trigger.entries()].filter(t =>
@ -28,7 +28,7 @@ export default async bot => {
trigger.forEach(async t => {
try {
await t[1].f(e);
await t[1].f({ ...a, ...parseArgs(a.message) });
console.log(`triggered > ${t[0]}`);
}
catch(error) {