how to define args using param discord.js 1

how to define args using param discord.js

//Seperate Arguments
let seperateArgs = args[0]; //0 being the first argument
//Input "hello world"
//Output "hello"

//Full Arguments
let fullArgs = args.slice(0).join(' ');
//Input "hello world"
//Output "hello world"

Here is what the above code is Doing:
1. We’re creating a variable called args, which is an array of all the arguments that the user has inputted.
2. We’re creating a variable called seperateArgs, which is the first argument that the user has inputted.
3. We’re creating a variable called fullArgs, which is all the arguments that the user has inputted.

Similar Posts