title: TypeError: Cannot read property 'toLowerCase' of undefined error javascript
body: <pre><code>function onChatHandler(target, context, msg, self) {
  if (self) { return; }
  
  const xxs = [&quot;asd&quot;,&quot;asdw&quot;];
  const commandName = msg.trim();
  if (xxs.some(word =&gt; msg.content.toLowerCase().includes(word))) {
    const num = rollDice();
    client.say(target, `Gelen sayi ${num}`);
    console.log(`* Bu ${commandName} komut kullanildi.`);
   
  }
  </code></pre>
  <p>TypeError: Cannot read property 'toLowerCase' of undefined error</p>