EnkaUser
class EnkaUser
The game account added to the Enka.Network account.
constructor
new EnkaUser(data, enka, username)
| PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION | 
|---|---|---|---|---|
| data | JsonObject | |||
| enka | EnkaClient | |||
| username | string | 
Properties
enka
Type: EnkaClient
username
Enka.Network username, not in-game nickname
Type: string
hash
Type: string
hoyoType
Type: HoyoType
user
Genshin User or Star Rail User
Type: User | TSUnknownKeyword
uid
Type: number | null
isVerified
Type: boolean
isPublic
Type: boolean
isUidPublic
Type: boolean
verificationCode
Type: string | null
verificationExpires
Type: Date | null
verificationCodeRetries
Type: number | null
region
The region of the server where the account was created
https://cdn.discordapp.com/attachments/971472744820650035/1072868537472925767/image.png
Type: GameServerRegion
order
Type: number
characterOrder
Type: {[characterId: string]: number} | null
url
Type: string
Methods
fetchBuilds
TSUnknownKeyword or unknown type in the return type can be replaced with StarRailCharacterBuild.
Returns: Promise<{[characterId: string]: (GenshinCharacterBuild | TSUnknownKeyword)[]}>
- the genshin and starrail character builds including saved builds in Enka.Network account
 
fetchGenshinBuilds
Returns: Promise<{[characterId: string]: GenshinCharacterBuild[]}>
- the genshin character builds including saved builds in Enka.Network account
 
fetchStarRailBuilds
This requires enka with starrailClient.
And the starrailClient option in EnkaClientOptions must be an instance of StarRail from starrail.js.TSUnknownKeyword or unknown type in the return type can be replaced with StarRailCharacterBuild.
Returns: Promise<{[characterId: string]: TSUnknownKeyword[]}>
- the starrail character builds including saved builds in Enka.Network account