forked from GitHub/dbot
Do [#359]
This commit is contained in:
parent
de2a22834d
commit
5e0f126693
@ -53,11 +53,19 @@ var api = function(dbot) {
|
||||
var applies = false;
|
||||
if(_.has(dbot.commands[commandName], 'regex')) {
|
||||
var cRegex = dbot.commands[commandName].regex;
|
||||
if(_.isArray(cRegex) && cRegex.length == 2) {
|
||||
var q = event.message.valMatch(cRegex[0], cRegex[1]);
|
||||
if(q) {
|
||||
applies = true;
|
||||
event.input = q;
|
||||
}
|
||||
} else if {
|
||||
var q = event.message.match(cRegex);
|
||||
if(q) {
|
||||
applies = true;
|
||||
event.input = q;
|
||||
]
|
||||
}
|
||||
} else {
|
||||
applies = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user