Browse Source

regex battle

master
calexil 2 years ago
parent
commit
5332a69e36
2 changed files with 6 additions and 13 deletions
  1. 2
    3
      bot.js
  2. 4
    10
      bot.js~

+ 2
- 3
bot.js View File

@@ -8,7 +8,6 @@ const bodyParser = require('body-parser');

// Message Array
const responseObject = {
console.log("best girll?".replace(/best g(ir|ri|ur)l+\??/gi, "Big Band."));
"test": "It worked!",
"best booty": "Squigly, Duh.",
"best booty?": "Squigly, Duh.",
@@ -16,8 +15,7 @@ const responseObject = {
"commands": "You can see my commands here: https://github.com/calexil/BansheeBot/blob/master/Commands.md"
};

console.log("best girll?".replace(/best g(ir|ri|ur)l+\??/gi, "Big Band."));

// Call the web page with express
app.use(express.static('public'));
app.use(bodyParser.json());
@@ -46,6 +44,7 @@ client.on('ready', () => {
if (!musicChannel) console.error('Could not find music channel!');

console.log('I am ready!');
console.log("best girl?".replace(/best g(ir|ri|ur)l+\??/g, "Big Band."));
});

// Reply to keywords in the array

+ 4
- 10
bot.js~ View File

@@ -7,22 +7,15 @@ const app = express();
const bodyParser = require('body-parser');

// Message Array
/*const responseObject = {
const responseObject = {
"test": "It worked!",
"best girl?": "Big Band.",
"best girl": "Big Band.",
"best grill": "Big Band.",
"best grill?": "Big Band.",
"best gurl": "Big Band.",
"best gurl?": "Big Band.",
"best booty": "Squigly, Duh.",
"best booty?": "Squigly, Duh.",
"hi": "Hello there, I'm a dumb bot written by [@calexil#9270](https://github.com/calexil) and [@Timberius#8180](https://github.com/TimboKZ) , you can see my commands here: https://github.com/calexil/BansheeBot/blob/master/Commands.md",
"commands": "You can see my commands here: https://github.com/calexil/BansheeBot/blob/master/Commands.md"
};*/

console.log("best girll?".replace(/best g(ir|ri|ur)l+\??/gi, "Big Band."));
};

// Call the web page with express
app.use(express.static('public'));
app.use(bodyParser.json());
@@ -51,6 +44,7 @@ client.on('ready', () => {
if (!musicChannel) console.error('Could not find music channel!');

console.log('I am ready!');
console.log("best girl?".replace(/best g(ir|ri|ur)l+\??/gi, "Big Band."));
});

// Reply to keywords in the array

Loading…
Cancel
Save