Functionalities
Other
$getArg
Returns an argument from the content in the first field or command line.

FUNCTION USAGE

  • $getArg[number]
  • $getArg[content;number]

Properties:

content - Looks for the argument in this content. number - The argument number to return from the content.

Example 1: Will return one.

1
bot.Command({
2
name: "test",
3
code: `
4
$getArg[one two three;1]
5
`
6
})
Copied!

Example 2: Will return two.

1
bot.Command({
2
name: "test",
3
code: `
4
$getArg[one two three;2]
5
`
6
})
Copied!

Example 3: Will return the 1st argument in the command line. Similar to $message[1]

1
bot.Command({
2
name: "test",
3
code: `
4
$getArg[1]
5
`
6
})
Copied!
Last modified 8mo ago
Copy link
Contents
Properties: