test > match

This commit is contained in:
Flummi 2016-08-23 19:25:50 +00:00
parent e02e3e60eb
commit 7cf82cb7f7

View File

@ -42,7 +42,7 @@ bot.on('motd', (e) => {
bot.on('message', (e) => {
trigger.trigger.forEach((entry,i,a) => {
if(e.message.match(entry.call)) {
if(entry.call.test(e.message)) {
lib.getUserlevel(e, (cb) => {
if(cb.level >= entry.level)
entry.func(e);