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