parent
14466270fb
commit
ad9db1df30
@ -17,7 +17,7 @@ module.exports = (lib) => {
|
|||||||
case "reset":
|
case "reset":
|
||||||
lib.cfg.trigger[e.network+e.channel] = lib.genStdTrigger();
|
lib.cfg.trigger[e.network+e.channel] = lib.genStdTrigger();
|
||||||
lib.config.write('trigger', e.network+e.channel, lib.cfg.trigger[e.network+e.channel], 'json', cbwc => {
|
lib.config.write('trigger', e.network+e.channel, lib.cfg.trigger[e.network+e.channel], 'json', cbwc => {
|
||||||
e.replyNotice("trigger resetted");
|
e.reply("trigger resetted");
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -26,21 +26,21 @@ module.exports = (lib) => {
|
|||||||
if(triggerexists(trigger)) {
|
if(triggerexists(trigger)) {
|
||||||
lib.cfg.trigger[e.network+e.channel][trigger] = !lib.cfg.trigger[e.network+e.channel][trigger];
|
lib.cfg.trigger[e.network+e.channel][trigger] = !lib.cfg.trigger[e.network+e.channel][trigger];
|
||||||
lib.config.write('trigger', e.network+e.channel, lib.cfg.trigger[e.network+e.channel], 'json', cbwc => {
|
lib.config.write('trigger', e.network+e.channel, lib.cfg.trigger[e.network+e.channel], 'json', cbwc => {
|
||||||
e.replyNotice(!cbwc?"trigger "+ trigger +" in channel "+e.channel.getName() + lib.bot.format.get(lib.cfg.trigger[e.network+e.channel][trigger]?'green':'red')+" "+(lib.cfg.trigger[e.network+e.channel][trigger]?'activated':'deactivated'):cbwc);
|
e.reply(!cbwc?"trigger "+ trigger +" in channel "+e.channel.getName() + lib.bot.format.get(lib.cfg.trigger[e.network+e.channel][trigger]?'green':'red')+" "+(lib.cfg.trigger[e.network+e.channel][trigger]?'activated':'deactivated'):cbwc);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
e.replyNotice("trigger "+trigger+" not found D:");
|
e.reply("trigger "+trigger+" not found D:");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var output = "";
|
var output = "";
|
||||||
e.replyNotice("Trigger in "+e.channel.getName()+" (green: activated, red: deactivated):");
|
e.reply("Trigger in "+e.channel.getName()+" (green: activated, red: deactivated):");
|
||||||
for(var key in lib.cfg.trigger[e.network+e.channel])
|
for(var key in lib.cfg.trigger[e.network+e.channel])
|
||||||
output += lib.bot.format.get(lib.cfg.trigger[e.network+e.channel][key]?'green':'red')+" "+key;
|
output += lib.bot.format.get(lib.cfg.trigger[e.network+e.channel][key]?'green':'red')+" "+key;
|
||||||
e.replyNotice(output);
|
e.reply(output);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
desc: 'muh'
|
desc: 'muh'
|
||||||
|
Loading…
Reference in New Issue
Block a user