muh
This commit is contained in:
parent
c8f9969ce4
commit
a6930add23
|
@ -26,7 +26,8 @@ module.exports = (lib) => {
|
|||
let where = params.in.concat(params.not);
|
||||
let query = `SELECT id, username FROM f0ck.items ${where.length > 0 ? `WHERE ${where.join(' || ')}` : ''} ORDER BY rand() LIMIT 1`;
|
||||
|
||||
console.log( query );
|
||||
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');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user