Skip to content

$filterTextSplitElement

$filterTextSplitElement filters elements from $textSplit and returns the elements that meet the criteria.

Usage

$filterTextSplitElement[query;type?;sep?]

Parameters

FieldTypeDescriptionRequired
querystringThe query that will be used for filtering.true
type?stringThe type of comparison to be performed during the filtering.
1. equal (default)
2. starts
3. ends
4. includes
true
sep?stringSeparator for the filtered elements. (default ,)true

Example(s)

This will return HelloWorld and HelloDiscord as they begin with Hello:

1
client.command({
2
name: "test",
3
code: `$filterTextSplitElement[Hello;starts;,]
4
$textSplit[HelloWorld__HowAreYou__HelloDiscord__Bye;__]`,
5
});