forked from GitHub/dbot
regex better
This commit is contained in:
parent
fed8cb6789
commit
a9f2d7fe51
@ -6,8 +6,6 @@ var youAre = function(dbot) {
|
|||||||
var num = Math.floor(Math.random()*11);
|
var num = Math.floor(Math.random()*11);
|
||||||
var key = data.message.match(/ is|are ([\d\w\s']*),?\.?/);
|
var key = data.message.match(/ is|are ([\d\w\s']*),?\.?/);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(num == 1 && key != undefined) {
|
if(num == 1 && key != undefined) {
|
||||||
if(key[1].indexOf('and') !== -1) {
|
if(key[1].indexOf('and') !== -1) {
|
||||||
key[1] = key[1].split('and')[0];
|
key[1] = key[1].split('and')[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user