v5.0.0
$replaceText
Replaces "sample" to "new" from "text"
This function allows you to replace text from the given text

Fields

This function has 3 required fields
  1. 1.
    Text (Required)
  2. 2.
    Sample (Required)
  3. 3.
    New (Required)
  4. 4.
    How Many (Optional)
Raw Usage: $replaceText[text;sample;new;howMany (optional)]

Options

  • Text - The text in general
  • Sample - The text that's being replaced
  • New - The text that is replacing <sample>
  • How Many - How many times the text is being replaced

Usage

Without optional field
1
bot.command({
2
name: "replacetext",
3
code: `$replaceText[Hi Bye;Bye;Goodbye]`
4
})
5
// Returns: Hi Goodbye
Copied!
With optional field
1
bot.command({
2
name: "replacetext",
3
code: `$replaceText[Hi Bye Bye;Bye;Goodbye;1]`
4
})
5
// Returns: Hi Goodbye Bye
Copied!
Last modified 1mo ago
Copy link
Edit on GitHub