v5.0.0
$advancedTextSplit
WARNING: This function is only recommended to use as advanced Aoi.js user because it's hard to understand.
This function basically allows you to have multiple splits in 1 message

Fields

This function has 3 required fields
  1. 1.
    text (Required)
  2. 2.
    separator (Required)
  3. 3.
    index (Required)
  4. 4.
    separator2 (Optional)
  5. 5.
    index2 (Optional)
  6. 6.
    Etc
Raw Usage: $advancedTextSplit[text;separator;index;separator2;index2;...]

Options

  • text - The text we are grabbing from
  • separator - The separator of the text which is used for the index
  • index - the position of the certain text we want to pull from <text> depending the <separator>

Usage

1
bot.command({
2
name: "advancedtextsplit",
3
code: `$advancedTextSplt[hi/bye|ok;/;2;|;1]`
4
})
5
​
6
/* Code breakdown
7
Our first separator is / and we want to return the 2nd index.
8
the code above returns "bye|ok"
9
Now the second separator is | and we want to return the 1st index.
10
so if our text is "bye|ok", then the first index would be "bye"
11
*/
Copied!
Last modified 1mo ago
Copy link
Edit on GitHub