2016-08-23 15:50:30 +00:00
|
|
|
module.exports = (bot, trigger, lib) => {
|
|
|
|
trigger.add({
|
|
|
|
name: 'user',
|
2016-08-30 19:24:44 +00:00
|
|
|
call: /^\!user( \@.*)?/i,
|
2016-08-23 15:50:30 +00:00
|
|
|
level: 0,
|
2016-08-24 07:55:40 +00:00
|
|
|
active: 1,
|
2016-08-23 15:50:30 +00:00
|
|
|
func: (e) => {
|
2016-08-30 19:24:44 +00:00
|
|
|
var tmp = e.message.match(/^\!user( +@(.*))?/i);
|
2016-08-30 19:36:40 +00:00
|
|
|
if(tmp[2] !== undefined) {
|
2016-08-30 19:24:44 +00:00
|
|
|
// e nachbauen xD
|
|
|
|
var etmp = {
|
|
|
|
network: e.network,
|
|
|
|
user: {
|
|
|
|
getNick: () => {
|
|
|
|
return tmp[2].trim();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
lib.getUser(etmp, (cbgu) => {
|
|
|
|
e.reply(cbgu);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
lib.getUser(e, (cbgu) => {
|
|
|
|
e.reply(cbgu);
|
|
|
|
});
|
|
|
|
}
|
2016-08-23 15:50:30 +00:00
|
|
|
},
|
|
|
|
desc: 'get Userdata'
|
|
|
|
});
|
|
|
|
};
|