@tagscript/plugin-discord • Docs
Class: abstract
BaseTransformer<T>
Transformer for discord.js objects.
Extended by
GuildTransformer
MemberTransformer
ChannelTransformer
RoleTransformer
UserTransformer
InteractionTransformer
Type Parameters
• T extends CommandInteraction
| Guild
| GuildChannel
| GuildMember
| Role
| User
The base type.
Implements
ITransformer
Constructors
new BaseTransformer()
new BaseTransformer<T
>(base
, safeValues
): BaseTransformer
<T
>
Parameters
• base: T
• safeValues: SafeValues
<T
> = {}
Returns
Defined in
tagscript-plugin-discord/src/lib/Transformer/Base.ts:26
Properties
base
protected
base: T
Defined in
tagscript-plugin-discord/src/lib/Transformer/Base.ts:22
safeValues
protected
safeValues: SafeValues
<T
> = {}
Defined in
tagscript-plugin-discord/src/lib/Transformer/Base.ts:24
Methods
toJSON()
toJSON(): SafeValues
<T
>
Returns
SafeValues
<T
>
Defined in
tagscript-plugin-discord/src/lib/Transformer/Base.ts:44
transform()
transform(tag
): null
| string
Transforms the given tag.
Parameters
• tag: Lexer
The tag that triggered the transformer.
Returns
null
| string
Implementation of
ITransformer.transform
Defined in
tagscript-plugin-discord/src/lib/Transformer/Base.ts:36
updateSafeValues()
protected
updateSafeValues(): void
Returns
void