mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
god damned regex i'll kill them all
This commit is contained in:
parent
85f4747dcb
commit
8e1d4d5722
@ -4,7 +4,7 @@ var youAre = function(dbot) {
|
|||||||
return {
|
return {
|
||||||
'listener': function(data) {
|
'listener': function(data) {
|
||||||
var num = Math.floor(Math.random()*6);
|
var num = Math.floor(Math.random()*6);
|
||||||
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[2].indexOf('and') !== -1) {
|
if(key[2].indexOf('and') !== -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user