Replacer(data)

A class used to register keywords in a message that are replaced with live data

new Replacer(data)

Create a replacer

Parameters:
Name Type Description
data Object

The data to make a replacer with

Properties:
Name Type Attributes Default Description
data.key String

The key that invokes the replacer

data.desc String

The description of the replacer

data.options Object <optional>
{}

The options for the replacer

Properties
Name Type Attributes Default Description
args Array<(ArgData|String)> <optional>
[]

The arguments for the replacer (Can be an argument data object or just the name of the argument)

data.action ReplacerAction

A function returning the string to replace with

Members

action : ReplacerAction

Function returning the string to replace with

desc : String

The description of the replacer

info : String

Get the info of this replacer as a string

Example
'**name** **<mandatory arg> (optional arg) (#number arg)** - *description*'

key : String

The data to make a replacer with

options : Object

The options for the replacer

Properties:
Name Type Description
args Array<Argument>

The arguments for the replacer