From c8f9969ce4bd798dbe54ec2f8c00f6baf5d87bf7 Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 22 Mar 2017 03:01:37 +0100 Subject: [PATCH] need coffee plox --- src/trigger/f0ckrand.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trigger/f0ckrand.js b/src/trigger/f0ckrand.js index f2d0d2e..25e6c3f 100644 --- a/src/trigger/f0ckrand.js +++ b/src/trigger/f0ckrand.js @@ -22,8 +22,8 @@ module.exports = (lib) => { let vars = params.in.concat(params.not); params.in = new Array(params.in.length).fill('username LIKE ?'); - params.out = params.in.length > 0 ? [] : new Array(params.out.length).fill('username NOT LIKE ?'); - let where = params.in.concat(params.out); + params.not = params.in.length > 0 ? [] : new Array(params.not.length).fill('username NOT LIKE ?'); + 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 );