title: How to stop bot from silently going offline for no reason and no console errors
body: <p>Ok, so basically I made a bot that worked fine but I made a huge mistake by making everything in index.js. So I have decided to start another bot and make everything separate from index.js. Before I haven't had discord.js-command installed but on this bot I used it. Since then my bot executes every command correctly and does the job but after some time it goes offline without reporting anything except <code>(node:9072) DeprecationWarning: Collection#filterArray: use Collection#filter instead</code> in the console.</p>
  <p>I have tried adding autoReconnect but it didn't wokr out. Still the same problem.</p>
  <p>Also before I did not have changing Bot Status and I added it with this code:</p>
  <pre><code>bot.on(&quot;ready&quot; , () =&gt; {
          bot.user.setStatus(&quot;dnd&quot;)
          console.log('Ready!');
          
          setInterval(() =&gt; {
              bot.user.setStatus('dnd')
                bot.user.setActivity(`with MEMBERS`, {type: 'PLAYING'}); 
            }, 1);
        });
        
        bot.on('ready', () =&gt; {
          bot.user.setStatus('dnd')
            setInterval(() =&gt; {
                bot.user.setActivity(`lawliet#0599`, {type: 'WATCHING'}); 
            }, 2);
        });
  </code></pre>
  <p>I tought this was the problem but I am not sure about that fact.</p>
  <p>I did not connect bot to any of hosting platforms. It is only on my computer and I expected it to work from the moment I do <code>node .</code> in console to the moment I use Ctrl+c in terminal or when I close it entirely.
  Instead it just goes online, I can use few commands before it goes offline.
  After that I have to reconnect it manually.</p>
  <p>If anyone knows how to fix this problem please take your time. Thank you.</p>