This commit is contained in:
Flummi 2017-01-31 10:52:27 +01:00
parent db6b381b7d
commit 1fea749028

View File

@ -1,11 +1,27 @@
var nude = new (require('node-nude')).nude();
module.exports = (lib) => {
lib.trigger.add({
name: 'test',
call: /^!test$/i,
call: /^!test/i,
level: 0,
active: 0,
active: 1,
func: (e) => {
var args = e.message.split(' ');
var id = args[1];
if(Number.isInteger(parseInt(id))) {
lib.sql.query("select `dest` from `f0ck`.`items` where `id` = ? limit 1", id, (err, rows) => {
if(rows[0]) {
var filename = __dirname + rows[0].dest;
nude.isnude(filename, (result) => {
if(result)
e.reply(id + " is NSFW");
else
e.reply(id + " is SFW");
});
}
});
}
},
desc: 'muh'
});