From 8c99039312ffc16d894b90c6c1650e47cf23f15b Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 22 Mar 2017 00:28:44 +0100 Subject: [PATCH] debuggsen --- src/trigger/f0ckrand.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trigger/f0ckrand.js b/src/trigger/f0ckrand.js index 6f05ef6..10afda6 100644 --- a/src/trigger/f0ckrand.js +++ b/src/trigger/f0ckrand.js @@ -11,9 +11,10 @@ module.exports = (lib) => { let query = "select `id`,`username` from `f0ck`.`items` order by rand() "; if(args.length > 0) - query += "where `username` = '" + args.join("' || `username` = '"); + query += "where `username` like '" + args.join("' || `username` like '"); query += "limit 1"; + console.log( query ); lib.sql.query(query, (err, rows, fields) => { if(!err) e.reply("f0ckrnd: "+lib.cfg.main.url+"/"+rows[0].id+" by: "+rows[0].username);