f0ck-random, yay

This commit is contained in:
Flummi 2017-03-20 20:17:03 +01:00
parent dbe7125ac8
commit 2b9204dea6

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'
});
};