f0ckv1/src/trigger/stats.js

20 lines
512 B
JavaScript
Raw Normal View History

var du = require('du');
2016-09-09 11:18:03 +00:00
module.exports = (bot, lib) => {
lib.trigger.add({
name: 'stats',
call: /^\!stats$/i,
level: 10,
active: 1,
func: (e) => {
lib.sql.query("select count(`id`) as anzahl from `f0ck`.`items`", (err, rows, fields) => {
var ret = "f0cked "+String(rows[0].anzahl);
du('./b/', function (err, size) {
ret += " f0cks ("+lib.formatSize(size)+")";
e.reply(ret);
})
});
},
desc: 'stats'
});
};