querybuilder intensifies
This commit is contained in:
@@ -14,14 +14,14 @@ export default async bot => {
|
||||
if(id <= 0)
|
||||
return false;
|
||||
|
||||
const f0ck = await sql.query("select dest from items where id = ? limit 1", [ id ]);
|
||||
const f0ck = await sql("items").select("dest").where("id", id).limit(1);
|
||||
if(f0ck.length === 0)
|
||||
return false;
|
||||
|
||||
await fs.unlink(`./public/b/${f0ck[0].dest}`).catch(_=>{});
|
||||
await fs.unlink(`./public/t/${id}`).catch(_=>{});
|
||||
|
||||
await sql.query("delete from items where id = ? limit 1", [ id ]);
|
||||
await sql("items").where("id", id).del().limit(1);
|
||||
|
||||
return id;
|
||||
}))).filter(d => d);
|
||||
@@ -29,7 +29,7 @@ export default async bot => {
|
||||
if(ret.length > 0)
|
||||
e.reply(`deleted ${ret.length}/${e.args.length} (${ret.join(",")}) f0cks`);
|
||||
else
|
||||
e.reply(`oof`)
|
||||
e.reply(`oof`);
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
Reference in New Issue
Block a user