uptime
This commit is contained in:
parent
9542f76ce7
commit
afff24ea5d
19
src/trigger/uptime.js
Normal file
19
src/trigger/uptime.js
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
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'
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user