Flummi = doof
This commit is contained in:
parent
b182fd2a3f
commit
f7f2f6d7ed
@ -11,20 +11,17 @@ module.exports = (lib) => {
|
||||
"not": []
|
||||
};
|
||||
|
||||
for(let i = 0; i < args.length; i++) {
|
||||
params[(args[0].charAt(0) === "!"?"not":"in")].push(args[0]);
|
||||
}
|
||||
for(let i = 0; i < args.length; i++)
|
||||
params[(args[i].charAt(0) === "!"?"not":"in")].push(args[i].replace("!"));
|
||||
|
||||
let query = "select `id`,`username` from `f0ck`.`items` ";
|
||||
//if(args.length > 0)
|
||||
// query += "where `username` like '" + args.join("' || `username` like '");
|
||||
|
||||
|
||||
if(args.length > 0)
|
||||
query += "where ";
|
||||
if(params.in.length > 0)
|
||||
query += "`username` like '" + args.join("' || `username` like '");
|
||||
query += "`username` like '" + params.in.join("' || `username` like '");
|
||||
if(params.not.length > 0)
|
||||
query += "`username` not like '" + args.join("' || `username` not like '");
|
||||
query += "`username` not like '" + params.not.join("' || `username` not like '");
|
||||
|
||||
query += " order by rand() limit 1";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user