var exec = require('child_process').exec;

module.exports = (lib) => {
        lib.trigger.add({
                name: 'uptime',
                call: /^!uptime/i,
                level: 0,
                active: 1,
                func: (e) => {
                        exec('sudo systemctl status f0ck', (error, stdout) => {
                                if(error === null) {
                                        let uptime = stdout.split('\n')[2].trim().replace("Active: active (running)", "i'm active");
                                        e.reply(uptime);
                                }
                        });
                },
                desc: 'Uptime'
        });
};
