Merge branch 'f0ckdev' into 'master'

f0ckrandom

See merge request !90
This commit is contained in:
Flummi 2017-03-20 19:20:26 +00:00
commit 83702a0873

15
src/trigger/f0ckrand.js Normal file
View File

@ -0,0 +1,15 @@
module.exports = (lib) => {
lib.trigger.add({
name: 'f0ckrand',
call: /^gib f0ck$/i,
level: 0,
active: 1,
func: (e) => {
lib.sql.query("select `id`,`username` from `f0ck`.`items` order by rand() limit 1", (err, rows, fields) => {
if(!err)
e.reply("f0ckrnd: "+lib.cfg.main.url+"/"+rows[0].id+" by: "+rows[0].username);
});
},
desc: 'Random-f0ck'
});
};