title: How to create a JS file with a command DISCORD.JS
body: <p>I'm making a discord bot and I was wondering if you can create a .js file with it. I haven't found a way to do it. My command reacts to &amp;createfile {name} and it will always create a .js file. My code so far:</p>
  <pre class="lang-js prettyprint-override"><code>const Discord = require('discord.js');
  
  module.exports = {
      name: 'createfile',
      run: async(client, message, args) =&gt; {
          var fileName = args[0]
          if(!args) {
              return message.reply('invalid name')
          };
          // Create file {fileName}.js
      }
  }
  </code></pre>