ja nun
This commit is contained in:
@ -23,11 +23,11 @@ export default async bot => {
|
||||
params.inc.push(name);
|
||||
}
|
||||
|
||||
let vars = params.inc.concat(params.inc.length == 0 ? params.exc : []);
|
||||
let vars = params.inc.concat(params.inc.length === 0 ? params.exc : []);
|
||||
params.inc = new Array(params.inc.length).fill("username like ?");
|
||||
params.exc = new Array(params.inc.length == 0 ? params.exc.length : 0).fill("username not like ?");
|
||||
let where = params.inc.concat(params.exc).join(" || ");
|
||||
let query = `select id, username, mime, size from items ${where.length > 0 ? `where ${where}` : ""} order by rand() limit 1`;
|
||||
const where = params.inc.concat(params.exc).join(" || ");
|
||||
const query = `select id, username, mime, size from items ${where.length > 0 ? `where ${where}` : ""} order by rand() limit 1`;
|
||||
|
||||
const rows = await sql.query(query, vars);
|
||||
if(rows.length === 0)
|
||||
|
Reference in New Issue
Block a user