v5.0.0
$argsCheck
Creates a condition depending in the amount of args required.
This function will check if the condition is met between the desired number of arguments and the number of arguments that are actually in the user's message.

Fields

This function has 2 fields
  1. 1.
    Number (Required)
  2. 2.
    Error (Required)
Raw Usage: $argsCheck[number;error message]

Options

  • Number - The number is the limitation of the arguments
  • Error - The error message appears when the limitation is met

Usage

1
bot.command({
2
name: "args",
3
code: `
4
You have more than two arguments, nice!
5
$argsCheck[>2;You have less than two arguments!]
6
`
7
});
8
​
9
//or
10
​
11
bot.command({
12
name: "args",
13
code: `
14
You have two arguments, nice!
15
$argsCheck[2;You don't have exactly 2 arguments]
16
`
17
});
18
​
19
//or
20
​
21
bot.command({
22
name: "args",
23
code: `
24
You have less than two arguments, nice!
25
$argsCheck[<2;You have more than two arguments!]
26
`
27
});
Copied!
Last modified 1mo ago
Copy link
Edit on GitHub