title: Unhandled Rejection at: TypeError: Cannot read property 'execute' of undefined
body: <p>The console says the error appears in <code>index.js</code>. I'm trying to export the currency commands code from another file and import it here, just so it looks a bit nicer.</p>
  
  <p>Error: <code>Unhandled Rejection at: TypeError: Cannot read property 'execute' of undefined</code></p>
  
  <pre><code>//index.js
  if (command === 'coinflip') {
      client.commands.get('coinflip').execute(message, args);
      }
  </code></pre>
  
  <pre><code>//coins.js
  module.exports = [
  {
      name: "coinflip",
      async execute(message, args) {
      //coinflip code here
  }}]
  </code></pre>
  
  <p>If any of you can see the issue (sorry if it's obvious!) and help me out, that would be greatly appreciated! Thank you.</p>