title: discord.js v12: How do I await for messages in a DM channel?
body: <p>This is the code that I've tried:</p>
  <pre class="lang-js prettyprint-override"><code>message.author.dmChannel.awaitMessages(msg =&gt; {
      console.log(msg.content)
  });
  </code></pre>
  <p>But it returns this error message:</p>
  <p><code>TypeError: Cannot read property 'awaitMessages' of null</code></p>
  <p><strong>Updated Code:</strong></p>
  <pre><code>message.author.send(&quot;What is your name?&quot;)
  
  const filter = m =&gt; m.author.id === message.author.id
  
  message.author.dmChannel.awaitMessages(filter)
       .then((collected) =&gt; console.log(collected.first().content))
  </code></pre>