title: ReferenceError: options is not defined
body: <p>ReferenceError: options is not defined
  at Object. (C:\Users\khair\Documents\GitHub\WideDiscord\index.js:171:9)
  at Module._compile (internal/modules/cjs/loader.js:1138:30)
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
  at Module.load (internal/modules/cjs/loader.js:986:32)
  at Function.Module._load (internal/modules/cjs/loader.js:879:14)
  at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
  at internal/main/run_main_module.js:17:47</p>
  <p>Here is the code</p>
  <pre><code>    var options = {
          url: &quot;http://results.dogpile.com/serp?qc=images&amp;q=&quot; + &quot;cat&quot;,
          method: &quot;GET&quot;,
          headers: {
              &quot;Accept&quot;: &quot;text/html&quot;,
              &quot;User-Agent&quot;: &quot;Chrome&quot;
          }
  };
  }
  
  
  request(options, function(error, response, responseBody) {
      if (error) {
          return;
      }
  
  
      $ = cheerio.load(responseBody); 
  
  
      var links = $(&quot;.image a.link&quot;);
  
      var urls = new Array(links.length).fill(0).map((v, i) =&gt; links.eq(i).attr(&quot;href&quot;));
      
      console.log(urls);
  
      if (!urls.length) {
         
          return;
      }
  
      // Send result
      message.channel.send( urls[Math.floor(Math.random() * urls.length)]);
  });
  
  </code></pre>