title: discord.js v12 checking if a user starts streaming
body: <p>This works as intended till it crashes. Every time a users starts streaming, it posts their stream link.
  The problem is that after like 5min the bot crashes and i get the error below.</p>
  <pre><code>let oldStreamingStatus = oldMember.activities.find(activity =&gt;  activity.type  === 'STREAMING') ? true : false;
                                     ^
  TypeError: Cannot read property 'activities' of undefined
  </code></pre>
  <p>my code below.</p>
  <pre><code>client.on('presenceUpdate', (oldMember, newMember) =&gt; {
  
  let oldStreamingStatus = oldMember.activities.find(activity =&gt; activity.type === 'STREAMING') ? true : false;
  let newStreamingStatus = newMember.activities.find(activity =&gt; activity.type === 'STREAMING') ? true : false;
  
  if (oldStreamingStatus == newStreamingStatus) {
      return;
  }
  
  if (newStreamingStatus) {
      if (newMember.member.roles.cache.some(r =&gt; [&quot;Raider&quot;,&quot;Trial&quot;].includes(r.name))) {
          const activity = newMember.activities.find(activity =&gt; activity.type === 'STREAMING')
          // console.log(newMember.activities)
          client.channels.cache.get(&quot;731911793257087006&quot;).send(`Hey! ${activity.url} is streaming!`);
          return;
      } else
          return;
      }});
  </code></pre>
  <p>I tried this code below. But it posts another message if someone changes their activity or if they are currently STREAMING and then start LISTENING to Spotify.</p>
  <pre><code>  client.on(&quot;presenceUpdate&quot;, (oldPresence, newPresence) =&gt; {
  
    if (!newPresence.activities) return false;
  
    newPresence.activities.forEach(activity =&gt; {
      if (activity.type == &quot;STREAMING&quot;) {
          console.log(`${newPresence.user.tag} is streaming at ${activity.url}.`);
         };
          });
     });
  </code></pre>
  <p>Seems like i need 10 reputation to post the pictures in the right way. I do apologize for that.</p>