f0ckv1/src/trigger/user.js

18 lines
427 B
JavaScript
Raw Normal View History

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-09-08 15:42:38 +00:00
if(!(user = e.message.match(/^\!user( +@(.*))?/i)[2]))
user = e.user.getNick();
else
user = user.trim();
bot.whois(user, e.network, (err, data) => {
e.reply(data);
});
2016-08-23 15:50:30 +00:00
},
desc: 'get Userdata'
});
};