alles Mist.

This commit is contained in:
Flummi 2017-07-28 10:34:37 +02:00
parent 241e49dd16
commit d4e3887148
2 changed files with 23 additions and 1 deletions

View File

@ -1,6 +1,6 @@
module.exports = (lib) => {
lib.bot.on('message', (e) => {
lib.trigger.trigger.forEach((entry,i,a) => {
lib.trigger.trigger.forEach(entry => {
if(e.message.match(entry.call)) {
let active = false;
if(lib.cfg.trigger[e.network+e.channel.getName()] !== undefined) {

22
src/trigger/f0ckfav.js Normal file
View File

@ -0,0 +1,22 @@
module.exports = (lib) => {
lib.trigger.add({
name: 'f0ckfav',
call: /^\!f0ckfav .*/,
level: 0,
active: 0,
func: (e) => {
// !f0ckfav f0cklink/id // fav hinzufuegen
// !f0ckfav user // favlink ausgeben ( https://f0ck.me/u/$user/favs )
let arg = e.message.trim().split(" ")[1];
e.reply(arg);
if(arg.match(/https:\/\/f0ck.me\/(\d+)/)) {
e.reply("Link");
}
else {
e.reply("User / ungueltig");
}
},
desc: 'f0ckfav'
});
};