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 &createfile {name} and it will always create a .js file. My code so far:
const Discord = require('discord.js');
module.exports = {
name: 'createfile',
run: async(client, message, args) => {
var fileName = args[0]
if(!args) {
return message.reply('invalid name')
};
// Create file {fileName}.js
}
}