In discord.js I'm trying to read args having no space issues, for example:
const { MessageEmbed } = require("discord.js");
module.exports = {
run: async (client, message, args, { GuildDB }) => {
let roleName = args[0];
let roleColor = args[1];
},
};
Problem is, "roleName" doesn't allow to me to use spaces and it counts the second word as roleColor when I use spaces in roleName
How do I easy control args? splits? or use spaces between args?
Any help is appreciated.
args?process.argv? Some args passed bydiscord.js? Where are the arguments parsed from? Just a string message that's split by spaces?"this is a single argument").runfunction used? Where do you pass the function? Who calls this function and passes it its arguments?