Skip to main content

DynamicTextAssets

class DynamicTextAssets extends TextAssets

constructor

new DynamicTextAssets(id, data, enka, convertToHtmlFormat, directory)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
idnumber
dataPartial<DynamicData>
enkaEnkaClient
convertToHtmlFormat✔️false
directorystring✔️

Properties

dynamicData

Type: DynamicData


id

inherited

Type: number


enka

inherited

Type: EnkaClient


convertToHtmlFormat

inherited

Type: boolean


directory

inherited

Type: string | null


Methods

getReplacedData

Returns: {text: string, usedParamIndices: number[]}

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
replaceWithPaths<DynamicData>[]✔️[]an empty array is the same as an array containing all paths
langLanguageCode✔️

Throws:

AssetsNotFoundError


getNullableReplacedData

Returns: {text: string, usedParamIndices: number[]} | null

  • null instead of throwing AssetsNotFoundError.
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
replaceWith(keyof DynamicData)[]✔️[]
langLanguageCode✔️

getReplacedText

Returns: string

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
replaceWith(keyof DynamicData)[]✔️[]
langLanguageCode✔️

Throws:

AssetsNotFoundError


getNullableReplacedText

Returns: string | null

  • null instead of throwing AssetsNotFoundError.
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
replaceWith(keyof DynamicData)[]✔️[]
langLanguageCode✔️

copyWithUserInfo

Returns: DynamicTextAssets

  • new instance of DynamicTextAssets with provided userInfo.
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
userInfoUserInfo

get

inherited

Returns: string

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
langLanguageCode✔️

Throws: AssetsNotFoundError


getNullable

inherited

Returns: string | null

  • null instead of throwing AssetsNotFoundError.
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
langLanguageCode✔️

setConvertToHtmlFormat

inherited

Returns: this

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
convertToHtmlFormatboolean

toString

inherited

Returns: string