Class: FiftyFiftyParser
Defined in: Parsers/FiftyFifty.ts:19
The fifty-fifty tag has a 50% change of returning the payload, and 50% chance of returning empty string.
Examples
Aliases: 50, ?
Extends
Implements
Constructors
new FiftyFiftyParser()
new FiftyFiftyParser(): FiftyFiftyParser
Defined in: Parsers/FiftyFifty.ts:20
Returns
Overrides
Properties
acceptedNames
protected
acceptedNames: string
[]
Defined in: Parsers/Base.ts:8
Inherited from
requiredParameter
protected
requiredParameter: boolean
Defined in: Parsers/Base.ts:10
Inherited from
requiredPayload
protected
requiredPayload: boolean
Defined in: Parsers/Base.ts:12
Inherited from
Methods
parse()
parse(ctx
): null
| string
Defined in: Parsers/FiftyFifty.ts:24
Parses the given tag.
Parameters
ctx
The context of the tag.
Returns
null
| string
Implementation of
toJSON()
toJSON(): object
Defined in: Parsers/Base.ts:29
Returns
object
acceptedNames
acceptedNames: string
[]
requiredParameter
requiredParameter: boolean
requiredPayload
requiredPayload: boolean
Inherited from
willAccept()
willAccept(ctx
): boolean
Defined in: Parsers/Base.ts:20
Whether the parser can handle the given tag.
Parameters
ctx
Returns
boolean