This commit is contained in:
Flummi 2017-03-22 14:06:09 +01:00
parent 7d2ffcd60e
commit 39d5b39658

View File

@ -11,10 +11,6 @@ module.exports = (lib) => {
exc: []
};
e.reply( JSON.stringify( args ) );
e.reply( JSON.stringify( params ) );
for(let i = 0; i < args.length; i++) {
let name = args[0];
if(name.charAt(0) === "!")
@ -29,8 +25,6 @@ module.exports = (lib) => {
let where = params.inc.concat(params.exc).join(' || ');
let query = `SELECT id, username FROM f0ck.items ${where.length > 0 ? `WHERE ${where}` : ''} ORDER BY rand() LIMIT 1`;
e.reply( query );
e.reply( JSON.stringify( vars ) );
lib.sql.query(query, vars, (err, rows) => {
e.reply(!err && rows.length > 0 ? `f0ckrnd: ${lib.cfg.main.url}/${rows[0].id} by: ${rows[0].username}` : 'nothing found, f0cker');
});