Class HonkaiImpact

Class representing the Honkai Impact 3rd game.

Constructors

Properties

cookie: ICookie

The cookie used for authentication.

The Daily module for the Honkai Impact 3rd game.

The HIRecordModule object provides an interface to interact with the user record feature in Honkai Star Rails.

redeem: RedeemModule

The Redeem module for the Honkai Impact 3rd game.

region: null | string

The region of the Honkai Impact 3rd account.

uid: null | number

The UID of the Honkai Impact 3rd account.

Accessors

  • get account(): null | IGame
  • Getter for the account property.

    Returns null | IGame

    The current value of the account property.

  • set account(game): void
  • Setter for the account property. Prevents from changing the value once set

    Parameters

    • game: null | IGame

      The game object to set as the account.

    Returns void

Methods

  • Create a new instance of HonkaiImpact using a Hoyolab account. If uid is not provided in the options, the account with the highest level will be used.

    Parameters

    • options: IHi3Options

      The options object used to configure the object.

    Returns Promise<HonkaiImpact>

    • A promise that resolves with a new HonkaiImpact instance.

    Error Wnen the CookieTokenV2 is not set.

    If an object is instantiated from this method but options.cookie.cookieTokenV2 is not set, it will throw an error. This method will access an Endpoint that contains a list of game accounts, which requires the cookieTokenV2 option.