Functionalities
Other
$argsLength
Returns the number of arguments in the message or the arguments provided in the command.

FUNCTION USAGE

  • $argsLength
  • $argsLength[]
  • $argsLength[content]

Properties:

[] - Bot will return the number of arguments provided in the entire command. content - Bot will return the number of arguments within the brackets.

Example 1: Returns the number of arguments provided in the command.

1
bot.Command({
2
name: "say",
3
code: `
4
$message[]
5
$onlyIf[$argsLength>=3;You have to say more than 2 words]
6
`
7
})
8
// With this limiter in place using $argsLength, command will only execute if more than 2 args are provided.
Copied!

Example 2: Returns the number of arguments in the message after the 2nd argument.

1
bot.Command({
2
name: "say",
3
code: `
4
$message[]
5
$onlyIf[$argsLength[$messageSlice[>2]]>=3;You have to say at least 3 more words after the 1st 2 words you say. For a total of 5 words.]
6
`
7
})
Copied!
Last modified 11mo ago
Copy link
Contents
Properties: