$replaceText
$replaceText will replace specific segments of text.
Usage
$replaceText[text;replacer;replaceTo;times?]Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| text | string | Text you want to modify. | true |
| replacer | string | The text that will be replaced. | true |
| replaceTo | string | The text that will replace replacer. | true |
| times? | number | How many times replaceTo replaces replacer. / Use -1 for the last one. | false |
Example(s)
This will replace M with D and the output will be Donkey:
1client.command({2 name: "replaceText",3 code: `4 $replaceText[Monkey;M;D]5 `6});Advanced Example
This will replace the word coffee two times using the last field of $replaceText:
1client.command({2 name: "replaceText",3 code: `4 $replaceText[I love drinking Coffee, Coffee gives me power! Coffee is bad for my health.;Coffee;orange juice;2]5 `6});This will replace Ferel and are using multiple $replaceText:
1client.command({2 name: "replaceText",3 code: `4 $replaceText[$replaceText[Leref and Ferel are the same person.;Ferel;Ayaka];are;are not]5 `6});