misc..
This commit is contained in:
@ -33,19 +33,10 @@ export default async bot => {
|
||||
order by random()
|
||||
`;
|
||||
|
||||
console.log(`select id, mime, username, size
|
||||
from "items"
|
||||
where
|
||||
${ args.map(a => a.charAt(0) === "!"
|
||||
? `username not ilike ${a.slice(1)}`
|
||||
: `username ilike ${a}`
|
||||
).join(' and ')}
|
||||
order by random()`);
|
||||
|
||||
if(rows.length === 0)
|
||||
return e.reply("nothing found, f0cker");
|
||||
return await e.reply("nothing found, f0cker");
|
||||
|
||||
return e.reply(`f0ckrnd: ${cfg.main.url.full}/${rows[0].id} by: ${rows[0].username} (${rows[0].mime}, ~${lib.formatSize(rows[0].size)})`);
|
||||
return await e.reply(`f0ckrnd: ${cfg.main.url.full}/${rows[0].id} by: ${rows[0].username} (${rows[0].mime}, ~${lib.formatSize(rows[0].size)})`);
|
||||
}
|
||||
}];
|
||||
};
|
||||
|
Reference in New Issue
Block a user