title: Bot sometimes posts NaN when I ask for a random image
body: <p>I am currently making a bot using the discord.js module. I am not very good in JavaScript or programming in general, and I've tried asking this everywhere, but I am unable to fix it. </p>
  
  <p>My bot is supposed to pull an image from an array with 12 images saved locally on my computer. Sometimes this works successfully, but sometimes it simply replies IN DISCORD (not in console) with "NaN". </p>
  
  <pre><code> else if (msg.content.startsWith(prefix + "duckquery")) {
      var ducks = [ {file: "./img/ducks1.jpg"}, {file: "./img/ducks2.jpg"}, {file: "./img/ducks3.jpg"}, +
      {file: "./img/ducks4.jpg"}, {file: "./img/ducks5.jpg"}, {file: "./img/ducks6.jpg"}, {file: "./img/ducks7.jpg"}, +
      {file: "./img/ducks8.jpg"}, {file: "./img/ducks9.jpg"}, {file: "./img/ducks10.jpg"}, {file: "./img/ducks11.jpg"}, +
      {file: "./img/ducks12.jpg"}];
  
      var duck = ducks[Math.floor(Math.random()*(ducks.length))]
      msg.channel.send(duck);
  </code></pre>