title: Copy value out of users input to another channel
body: <p>I am working on a chatbot for school that solves problems in my school. So basically I'm stuck on this part because I have no idea how to do this...</p>
  
  <ul>
  <li>I want to check if a certain value in a sentence is equal to a value in my array.</li>
  <li>If it is equal to a value in my array, then I want my chatbot to write a message to another channel containing that variable </li>
  </ul>
  
  <p>So lets say I have the sentence:</p>
  
  <blockquote>
    <p>Hi, I have a problem in classroom 108</p>
  </blockquote>
  
  <p>The value "classroom 108" is equal to the value "classroom 108" in my array. </p>
  
  <pre><code>   var classroom= [
      {
          L108: ["classroom 108","L108"]
      },{
          L208: ["classroom 208","L208"]
      }
  ];
  </code></pre>
  
  <p>So now I want to write a message to another channel containing the variable "L108". </p>
  
  <pre><code>function handleMessage(message) {
       classroom.forEach((value, index) =&gt; {
          if (message.includes(classroom)) {
              classroom();
              console.log(message);
          };
      })
  };
  function classroom(message) {
      const params = {
          icon_emoji: ':smiley:'
      }
      textchannel = probleemoplosser + ", een docent heeft een probleem met het " + probleem + " in ",classroom, params;
      reactie =  "Top, ik heb het doorgegeven aan " + naam;
      bot.postMessageToChannel( otherchannel,textchannel,params);
      bot.postMessageToChannel('general',reactie, params);
  };
  </code></pre>
  
  <p>I don't have much experience with JavaScript so any help is welcome...thanks in advance!&lt;3</p>