Answers for "const args = message.content.slice(config.prefix.length).trim().split(/ +/g);"

0

const args = message.content.slice(config.prefix.length).trim().split(/ +/g);

if (command === "asl") {
  let age = args[0]; // Remember arrays are 0-based!.
  let sex = args[1];
  let location = args[2];
  message.reply(`Hello ${message.author.username}, I see you're a ${age} year old ${sex} from ${location}. Wanna date?`);
}
Posted by: Guest on April-14-2021

Browse Popular Code Answers by Language