Browse Source

regex stuff

master
calexil 2 years ago
parent
commit
b17f6b1fe8
1 changed files with 6 additions and 7 deletions
  1. 6
    7
      bot.js

+ 6
- 7
bot.js View File

@@ -33,14 +33,13 @@ client.on("message", (message) => {
/*client.on("message", (message) => {
message.channel.send(message.content.replace(/best g(ir|ri|ur)l+\??/g, "Big Band."));
});*/
let rgContent = /best g(ir|ri|ur)l+\??/igy;
client.on( "message", (message) => {
let msContent = message.content.replace( rgContent, "Big Band." );
let rg = /best g(ir|ri|ur)l+\??/ig;
client.on( "message", (message) -> {
let m = message.content.replace( rg, "Big Band" );
if( rgContent.lastIndex > 0 ) {
message.channel.send(msContent);
console.log(` ${msContent}`);
if( m != message.content ) {
message.channel.send(m);
}
} );


Loading…
Cancel
Save