diff --git a/src/trigger/f0ckrand.js b/src/trigger/f0ckrand.js index 10afda6..2f813af 100644 --- a/src/trigger/f0ckrand.js +++ b/src/trigger/f0ckrand.js @@ -9,10 +9,10 @@ module.exports = (lib) => { args.shift(); args.shift(); - let query = "select `id`,`username` from `f0ck`.`items` order by rand() "; + let query = "select `id`,`username` from `f0ck`.`items` "; if(args.length > 0) query += "where `username` like '" + args.join("' || `username` like '"); - query += "limit 1"; + query += "order by rand() limit 1"; console.log( query ); lib.sql.query(query, (err, rows, fields) => {