debuggsen
This commit is contained in:
parent
0331b53d76
commit
aa36f5bcd4
|
@ -1,13 +1,11 @@
|
||||||
module.exports = (lib) => {
|
module.exports = (lib) => {
|
||||||
lib.trigger.add({
|
lib.trigger.add({
|
||||||
name: 'f0ckrand',
|
name: 'f0ckrand',
|
||||||
call: /^gib f0ck/i,
|
call: /^gib f0ck/i,
|
||||||
level: 0,
|
level: 0,
|
||||||
active: 1,
|
active: 1,
|
||||||
func: (e) => {
|
func: (e) => {
|
||||||
let args = lib.sql.escape(e.message).split(" ");
|
let args = lib.sql.escape(e.message).split(" ").splice(2);
|
||||||
args.shift();
|
|
||||||
args.shift();
|
|
||||||
|
|
||||||
let query = "select `id`,`username` from `f0ck`.`items` ";
|
let query = "select `id`,`username` from `f0ck`.`items` ";
|
||||||
if(args.length > 0)
|
if(args.length > 0)
|
||||||
|
@ -17,11 +15,11 @@ module.exports = (lib) => {
|
||||||
console.log( query );
|
console.log( query );
|
||||||
lib.sql.query(query, (err, rows, fields) => {
|
lib.sql.query(query, (err, rows, fields) => {
|
||||||
if(!err && rows.length > 0)
|
if(!err && rows.length > 0)
|
||||||
e.reply("f0ckrnd: "+lib.cfg.main.url+"/"+rows[0].id+" by: "+rows[0].username);
|
e.reply(`f0ckrnd: ${lib.cfg.main.url}/${rows[0].id} by: ${rows[0].username}`);
|
||||||
else
|
else
|
||||||
e.reply("nothing found, f0cker");
|
e.reply("nothing found, f0cker");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
desc: 'Random-f0ck'
|
desc: 'Random-f0ck'
|
||||||
});
|
});
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user