DynamicTextAssets
class DynamicTextAssets extends TextAssets
Properties
Methods
constructor
new DynamicTextAssets(id, data, enka, convertToHtmlFormat, directory)
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
id | number | |||
data | Partial<DynamicData> | |||
enka | EnkaClient | |||
convertToHtmlFormat | ✔️ | false | ||
directory | string | ✔️ |
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[]}
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
replaceWith | Paths<DynamicData>[] | ✔️ | [] | an empty array is the same as an array containing all paths |
lang | LanguageCode | ✔️ |
Throws:
AssetsNotFoundError
getNullableReplacedData
Returns: {text: string, usedParamIndices: number[]} | null
- null instead of throwing AssetsNotFoundError.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
replaceWith | (keyof DynamicData)[] | ✔️ | [] | |
lang | LanguageCode | ✔️ |
getReplacedText
Returns: string
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
replaceWith | (keyof DynamicData)[] | ✔️ | [] | |
lang | LanguageCode | ✔️ |
Throws:
AssetsNotFoundError
getNullableReplacedText
Returns: string | null
- null instead of throwing AssetsNotFoundError.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
replaceWith | (keyof DynamicData)[] | ✔️ | [] | |
lang | LanguageCode | ✔️ |
copyWithUserInfo
Returns: DynamicTextAssets
- new instance of DynamicTextAssets with provided
userInfo
.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
userInfo | UserInfo |
get
inherited
Returns: string
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
lang | LanguageCode | ✔️ |
Throws: AssetsNotFoundError
getNullable
inherited
Returns: string | null
- null instead of throwing AssetsNotFoundError.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
lang | LanguageCode | ✔️ |
setConvertToHtmlFormat
inherited
Returns: this
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
convertToHtmlFormat | boolean |
toString
inherited
Returns: string