src/main.js
function addTopic(res, topic) {
    const keyTopic = topic.toLowerCase();
    if (!taboo.has(keyTopic)) {
      taboo.set(keyTopic, new RegExp(`\\b${topic}\\b`, "i"));
      saveList(res.robot.brain);
      res.reply(capitalize(`${topic} is now taboo`));
    } else {
      res.reply(`Oops, ${topic} is already taboo`);
    }
  }
function addTopic(res, topic) {
    const keyTopic = topic.toLowerCase();
    if (!taboo.has(keyTopic)) {
      taboo.set(keyTopic, new RegExp(`\\b${topic}\\b`, "i"));
      saveList(res.robot.brain);
      res.reply(capitalize(`${topic} is now taboo`));
    } else {
      res.reply(`Oops, ${topic} is already taboo`);
    }
  }
function addTopic ( res , topic ) { const keyTopic = topic . toLowerCase ( ) ; if ( ! taboo . has ( keyTopic ) ) { taboo . set ( keyTopic , new RegExp ( ` \\ ${ topic } \\ ` , "i" ) ) ; saveList ( res . robot . brain ) ; res . reply ( capitalize ( ` ${ topic } ` ) ) ; } else { res . reply ( ` ${ topic } ` ) ; } }
Adds a new taboo topic.
Adds a new taboo topic .