20 lines
517 B
JavaScript
20 lines
517 B
JavaScript
|
var du = require('du');
|
||
|
|
||
|
module.exports = (bot, trigger, 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'
|
||
|
});
|
||
|
};
|