Skip to content

$indexOfArg

$indexOfArg will return the index of the given query.

Usage

$indexOfArg[string;query]

Parameters

FieldTypeDescriptionRequired
stringstringThe text the bot will be checking the index of.true
querystringThe query the bot will be checking for.true

Example(s)

This will return 3 as great is the third argument in the query:

1
client.command({
2
name: "indexOfArgs",
3
code: `
4
$indexOfArgs[aoi.js is great for users who are new to Discord's API!;great]
5
`
6
});