Class: RequiredParser
Defined in: tagscript-plugin-discord/src/lib/Parsers/AllowDeny.ts:39
The require tag will attempt to convert the given parameter into a channel, user
or role, using name or Id. If the user running the tag is not in the targeted
channel or doesn't have the targeted role or their id isn't same as targeted user's id, the tag will stop processing and
it will send the response if one is given. Multiple role, user or channel
requirements can be given, and should be split by a ,
.
Aliases: allowlist, whitelist
Examples
Developers need to add the check themselves.
Extends
BaseParser
Implements
IParser
Constructors
new RequiredParser()
new RequiredParser(): RequiredParser
Defined in: tagscript-plugin-discord/src/lib/Parsers/AllowDeny.ts:40
Returns
Overrides
BaseParser.constructor
Properties
acceptedNames
protected
acceptedNames: string
[]
Defined in: tagscript/dist/index.d.ts:381
Inherited from
BaseParser.acceptedNames
requiredParameter
protected
requiredParameter: boolean
Defined in: tagscript/dist/index.d.ts:382
Inherited from
BaseParser.requiredParameter
requiredPayload
protected
requiredPayload: boolean
Defined in: tagscript/dist/index.d.ts:383
Inherited from
BaseParser.requiredPayload
Methods
parse()
parse(ctx
): null
| ""
Defined in: tagscript-plugin-discord/src/lib/Parsers/AllowDeny.ts:44
Parses the given tag.
Parameters
ctx
Context
The context of the tag.
Returns
null
| ""
Implementation of
IParser.parse
toJSON()
toJSON(): object
Defined in: tagscript/dist/index.d.ts:386
Returns
object
acceptedNames
acceptedNames: string
[]
requiredParameter
requiredParameter: boolean
requiredPayload
requiredPayload: boolean
Inherited from
BaseParser.toJSON
willAccept()
willAccept(ctx
): boolean
Defined in: tagscript/dist/index.d.ts:385
Parameters
ctx
Context
Returns
boolean
Implementation of
IParser.willAccept
Inherited from
BaseParser.willAccept