thelounge-plugin-timer
Version:
Simple plugin for the irc client thelounge that allows you to send commands using a timer
17 lines (16 loc) • 455 B
JavaScript
const timerCommand = {
input: function (client, target, command, args) {
if(args.length > 2) {
let message = args.slice(1).join(' ');
setTimeout(function() {
client.runAsUser("/" + message, target.chan.id);
}, parseInt(args[0]) * 1000);
}
},
allowDisconnected: true
};
module.exports = {
onServerStart: api => {
api.Commands.add("timer", timerCommand);
},
};