nudetest
This commit is contained in:
parent
db6b381b7d
commit
1fea749028
@ -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'
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user