test > match
This commit is contained in:
parent
e02e3e60eb
commit
7cf82cb7f7
|
@ -42,7 +42,7 @@ bot.on('motd', (e) => {
|
||||||
|
|
||||||
bot.on('message', (e) => {
|
bot.on('message', (e) => {
|
||||||
trigger.trigger.forEach((entry,i,a) => {
|
trigger.trigger.forEach((entry,i,a) => {
|
||||||
if(e.message.match(entry.call)) {
|
if(entry.call.test(e.message)) {
|
||||||
lib.getUserlevel(e, (cb) => {
|
lib.getUserlevel(e, (cb) => {
|
||||||
if(cb.level >= entry.level)
|
if(cb.level >= entry.level)
|
||||||
entry.func(e);
|
entry.func(e);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user