Skip to content

$indexOf

$indexOf will return the index of the given character.

Usage

$indexOf[string;char]

Parameters

FieldTypeDescriptionRequired
stringstringThe text the bot will be checking the index of.true
charstringThe characters the bot will be checking for.true

Example(s)

This will return 8 as it’s the first occurring position of the character w:

1
client.command({
2
name: "indexOf",
3
code: `
4
$indexOf[Hello, what is wrong with you?;w]
5
`
6
});