title: How do I check if a subreddit exists in discord.js
body: <p>So I was making a command to browse reddit for images, using the npm package 'trev'</p>
  <pre class="lang-js prettyprint-override"><code>const trev = require(&quot;trev&quot;);
  module.exports = {
      name: 'reddit',
      description: &quot;Gets an image from reddit&quot;,
      async execute(message, args, client, Discord) {
          
          const sub = args[0]
          const subr = await trev.getCustomSubreddit(sub)
  </code></pre>
  
  <p>it works perfectly fine if I enter a subreddit which exists, but if i enter an inexistent subreddit for the first argument, then the code crashes and gives me and error, so I want to know if there is a way to check if the subreddit actually exists.</p>