Class: ReplaceParser
The replace tag will replace specific characters in a string.
The parameter should split by a ,, containing the characters to find
before the command and the replacements after.
Example
{replace(o,i):welcome to the server}
# welcime ti the server
{replace(1,6):{args}}
# if {args} is 1637812
# 6637862
{replace(, ):Test}
# T e s tHierarchy
-
↳
ReplaceParser
Implements
Constructors
constructor
• new ReplaceParser()
Overrides
Properties
acceptedNames
• Protected acceptedNames: string[]
Inherited from
requiredParameter
• Protected requiredParameter: boolean
Inherited from
requiredPayload
• Protected requiredPayload: boolean
Inherited from
Methods
parse
▸ parse(ctx): string
Parses the given tag.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The context of the tag. |
Returns
string
Implementation of
willAccept
▸ willAccept(ctx): boolean
Whether the parser can handle the given tag.
Parameters
| Name | Type | Description |
|---|---|---|
ctx | Context | The context of the tag. |
Returns
boolean