Class of the client

This is the main body of Genshin-Manager where cache information is stored

Hierarchy

Constructors

  • Create a Client

    Parameters

    Returns Client

Properties

option: ClientOption
_assetEventEmitter: EventEmitter<AssetCacheManagerEventMap> = ...

Asset event emitter

This property is deprecated because it is used to pass data to each class

_cachedTextMap: Map<string, string> = ...

Cached text map

This property is deprecated because it is used to pass data to each class

Text hash

Text

Accessors

  • get gameVersion(): undefined | string
  • Cached game version

    Returns undefined | string

    Cached game version

    `5.1.0`
    
  • get gameVersion(): undefined | string
  • Assets game version text

    Returns undefined | string

    Assets game version text or undefined

Methods

  • Alias for emitter.on(eventName, listener).

    Type Parameters

    • K

    Parameters

    • eventName: ClientEvents | (keyof ClientEventMap) | K

      The name of the event.

    • listener: K extends keyof ClientEventMap
          ? ClientEventMap[K<K>] extends unknown[]
              ? ((...args: ClientEventMap[K<K>]) => Awaitable<void>)
              : never
          : never

      The callback function. (supports async)

    Returns this

    EventEmitter.addListener()

  • Change cached languages

    Parameters

    • language:
          | "EN"
          | "RU"
          | "VI"
          | "TH"
          | "PT"
          | "KR"
          | "JP"
          | "ID"
          | "FR"
          | "ES"
          | "DE"
          | "CHT"
          | "CHS"

      Country code

    Returns Promise<void>

    const client = new Client()
    await client.deploy()
    await client.changeLanguage('JP')
  • Deploy assets to cache & Update assets

    Returns Promise<void>

    const client = new Client()
    await client.deploy()
  • Synchronously calls each of the listeners registered for the event namedeventName, in the order they were registered, passing the supplied arguments to each. Returns true if the event had listeners, false otherwise.

    Type Parameters

    • K

    Parameters

    • eventName: ClientEvents | (keyof ClientEventMap) | K

      The name of the event.

    • Rest...args: K extends keyof ClientEventMap
          ? ClientEventMap[K<K>]
          : never

      Arguments to pass to the listeners.

    Returns boolean

    EventEmitter.emit()

  • Alias for emitter.removeListener().

    Type Parameters

    • K

    Parameters

    • eventName: ClientEvents | (keyof ClientEventMap) | K

      The name of the event.

    • listener: K extends keyof ClientEventMap
          ? ClientEventMap[K<K>] extends unknown[]
              ? ((...args: ClientEventMap[K<K>]) => Awaitable<void>)
              : never
          : never

      The callback function. (supports async)

    Returns this

    EventEmitter.off()

  • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventNameand listener will result in the listener being added, and called, multiple times.

    Type Parameters

    • K

    Parameters

    • eventName: ClientEvents | (keyof ClientEventMap) | K

      The name of the event.

    • listener: K extends keyof ClientEventMap
          ? ClientEventMap[K<K>] extends unknown[]
              ? ((...args: ClientEventMap[K<K>]) => Awaitable<void>)
              : never
          : never

      The callback function. (supports async)

    Returns this

    EventEmitter.on()

  • Adds a one-timelistener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

    Type Parameters

    • K

    Parameters

    • eventName: ClientEvents | (keyof ClientEventMap) | K

      The name of the event.

    • listener: K extends keyof ClientEventMap
          ? ClientEventMap[K<K>] extends unknown[]
              ? ((...args: ClientEventMap[K<K>]) => Awaitable<void>)
              : never
          : never

      The callback function. (supports async)

    Returns this

    EventEmitter.once()

  • Removes all listeners, or those of the specified eventName.

    Type Parameters

    • K

    Parameters

    • Optionalevent: ClientEvents | (keyof ClientEventMap) | K

      The name of the event.

    Returns this

    EventEmitter.removeAllListeners()

  • Removes the specified listener from the listener array for the event namedeventName.

    Type Parameters

    • K

    Parameters

    • eventName: ClientEvents | (keyof ClientEventMap) | K

      The name of the event.

    • listener: K extends keyof ClientEventMap
          ? ClientEventMap[K<K>] extends unknown[]
              ? ((...args: ClientEventMap[K<K>]) => Awaitable<void>)
              : never
          : never

      The callback function. (supports async)

    Returns this

    EventEmitter.removeListener()

  • Add ExcelBinOutput Key from Class Prototype to AssetCacheManager

    Parameters

    • classPrototype: unknown

      Class Prototype

    Returns void

    This method is deprecated because it is used to pass data to each class

  • Get cached excel bin output by name

    Parameters

    • key:
          | "AnimalCodexExcelConfigData"
          | "AvatarCostumeExcelConfigData"
          | "AvatarCurveExcelConfigData"
          | "AvatarExcelConfigData"
          | "AvatarPromoteExcelConfigData"
          | "AvatarSkillDepotExcelConfigData"
          | "AvatarSkillExcelConfigData"
          | "AvatarTalentExcelConfigData"
          | "DungeonEntryExcelConfigData"
          | "DungeonLevelEntityConfigData"
          | "EquipAffixExcelConfigData"
          | "FetterInfoExcelConfigData"
          | "FettersExcelConfigData"
          | "FetterStoryExcelConfigData"
          | "ManualTextMapConfigData"
          | "MaterialExcelConfigData"
          | "MonsterCurveExcelConfigData"
          | "MonsterDescribeExcelConfigData"
          | "MonsterExcelConfigData"
          | "ProudSkillExcelConfigData"
          | "ProfilePictureExcelConfigData"
          | "ReliquaryAffixExcelConfigData"
          | "ReliquaryExcelConfigData"
          | "ReliquaryLevelExcelConfigData"
          | "ReliquaryMainPropExcelConfigData"
          | "ReliquarySetExcelConfigData"
          | "TowerFloorExcelConfigData"
          | "TowerLevelExcelConfigData"
          | "TowerScheduleExcelConfigData"
          | "WeaponCurveExcelConfigData"
          | "WeaponExcelConfigData"
          | "WeaponPromoteExcelConfigData"

      ExcelBinOutput name

    Returns {}

    Cached excel bin output

      This method is deprecated because it is used to pass data to each class

    • Get Json from cached excel bin output

      Parameters

      • key:
            | "AnimalCodexExcelConfigData"
            | "AvatarCostumeExcelConfigData"
            | "AvatarCurveExcelConfigData"
            | "AvatarExcelConfigData"
            | "AvatarPromoteExcelConfigData"
            | "AvatarSkillDepotExcelConfigData"
            | "AvatarSkillExcelConfigData"
            | "AvatarTalentExcelConfigData"
            | "DungeonEntryExcelConfigData"
            | "DungeonLevelEntityConfigData"
            | "EquipAffixExcelConfigData"
            | "FetterInfoExcelConfigData"
            | "FettersExcelConfigData"
            | "FetterStoryExcelConfigData"
            | "ManualTextMapConfigData"
            | "MaterialExcelConfigData"
            | "MonsterCurveExcelConfigData"
            | "MonsterDescribeExcelConfigData"
            | "MonsterExcelConfigData"
            | "ProudSkillExcelConfigData"
            | "ProfilePictureExcelConfigData"
            | "ReliquaryAffixExcelConfigData"
            | "ReliquaryExcelConfigData"
            | "ReliquaryLevelExcelConfigData"
            | "ReliquaryMainPropExcelConfigData"
            | "ReliquarySetExcelConfigData"
            | "TowerFloorExcelConfigData"
            | "TowerLevelExcelConfigData"
            | "TowerScheduleExcelConfigData"
            | "WeaponCurveExcelConfigData"
            | "WeaponExcelConfigData"
            | "WeaponPromoteExcelConfigData"

        ExcelBinOutput name

      • id: string | number

        ID of character, etc

      Returns JsonObject

      Json

      This method is deprecated because it is used to pass data to each class

    • Check if cached excel bin output exists by ID

      Parameters

      • key:
            | "AnimalCodexExcelConfigData"
            | "AvatarCostumeExcelConfigData"
            | "AvatarCurveExcelConfigData"
            | "AvatarExcelConfigData"
            | "AvatarPromoteExcelConfigData"
            | "AvatarSkillDepotExcelConfigData"
            | "AvatarSkillExcelConfigData"
            | "AvatarTalentExcelConfigData"
            | "DungeonEntryExcelConfigData"
            | "DungeonLevelEntityConfigData"
            | "EquipAffixExcelConfigData"
            | "FetterInfoExcelConfigData"
            | "FettersExcelConfigData"
            | "FetterStoryExcelConfigData"
            | "ManualTextMapConfigData"
            | "MaterialExcelConfigData"
            | "MonsterCurveExcelConfigData"
            | "MonsterDescribeExcelConfigData"
            | "MonsterExcelConfigData"
            | "ProudSkillExcelConfigData"
            | "ProfilePictureExcelConfigData"
            | "ReliquaryAffixExcelConfigData"
            | "ReliquaryExcelConfigData"
            | "ReliquaryLevelExcelConfigData"
            | "ReliquaryMainPropExcelConfigData"
            | "ReliquarySetExcelConfigData"
            | "TowerFloorExcelConfigData"
            | "TowerLevelExcelConfigData"
            | "TowerScheduleExcelConfigData"
            | "WeaponCurveExcelConfigData"
            | "WeaponExcelConfigData"
            | "WeaponPromoteExcelConfigData"

        ExcelBinOutput name

      • id: string | number

        ID of character, etc

      Returns boolean

      Cached excel bin output exists

      This method is deprecated because it is used to pass data to each class

    • Check if cached excel bin output exists by name

      Parameters

      • key:
            | "AnimalCodexExcelConfigData"
            | "AvatarCostumeExcelConfigData"
            | "AvatarCurveExcelConfigData"
            | "AvatarExcelConfigData"
            | "AvatarPromoteExcelConfigData"
            | "AvatarSkillDepotExcelConfigData"
            | "AvatarSkillExcelConfigData"
            | "AvatarTalentExcelConfigData"
            | "DungeonEntryExcelConfigData"
            | "DungeonLevelEntityConfigData"
            | "EquipAffixExcelConfigData"
            | "FetterInfoExcelConfigData"
            | "FettersExcelConfigData"
            | "FetterStoryExcelConfigData"
            | "ManualTextMapConfigData"
            | "MaterialExcelConfigData"
            | "MonsterCurveExcelConfigData"
            | "MonsterDescribeExcelConfigData"
            | "MonsterExcelConfigData"
            | "ProudSkillExcelConfigData"
            | "ProfilePictureExcelConfigData"
            | "ReliquaryAffixExcelConfigData"
            | "ReliquaryExcelConfigData"
            | "ReliquaryLevelExcelConfigData"
            | "ReliquaryMainPropExcelConfigData"
            | "ReliquarySetExcelConfigData"
            | "TowerFloorExcelConfigData"
            | "TowerLevelExcelConfigData"
            | "TowerScheduleExcelConfigData"
            | "WeaponCurveExcelConfigData"
            | "WeaponExcelConfigData"
            | "WeaponPromoteExcelConfigData"

        ExcelBinOutput name

      Returns boolean

      Cached excel bin output exists

      This method is deprecated because it is used to pass data to each class

    • Search ID in CachedExcelBinOutput by text

      Parameters

      • key:
            | "AnimalCodexExcelConfigData"
            | "AvatarCostumeExcelConfigData"
            | "AvatarCurveExcelConfigData"
            | "AvatarExcelConfigData"
            | "AvatarPromoteExcelConfigData"
            | "AvatarSkillDepotExcelConfigData"
            | "AvatarSkillExcelConfigData"
            | "AvatarTalentExcelConfigData"
            | "DungeonEntryExcelConfigData"
            | "DungeonLevelEntityConfigData"
            | "EquipAffixExcelConfigData"
            | "FetterInfoExcelConfigData"
            | "FettersExcelConfigData"
            | "FetterStoryExcelConfigData"
            | "ManualTextMapConfigData"
            | "MaterialExcelConfigData"
            | "MonsterCurveExcelConfigData"
            | "MonsterDescribeExcelConfigData"
            | "MonsterExcelConfigData"
            | "ProudSkillExcelConfigData"
            | "ProfilePictureExcelConfigData"
            | "ReliquaryAffixExcelConfigData"
            | "ReliquaryExcelConfigData"
            | "ReliquaryLevelExcelConfigData"
            | "ReliquaryMainPropExcelConfigData"
            | "ReliquarySetExcelConfigData"
            | "TowerFloorExcelConfigData"
            | "TowerLevelExcelConfigData"
            | "TowerScheduleExcelConfigData"
            | "WeaponCurveExcelConfigData"
            | "WeaponExcelConfigData"
            | "WeaponPromoteExcelConfigData"

        ExcelBinOutput name

      • text: string

        Text

      Returns string[]

      IDs

      This method is deprecated because it is used to pass data to each class

    • Set excel bin output to cache

      Parameters

      • keys: Set<
            | "AnimalCodexExcelConfigData"
            | "AvatarCostumeExcelConfigData"
            | "AvatarCurveExcelConfigData"
            | "AvatarExcelConfigData"
            | "AvatarPromoteExcelConfigData"
            | "AvatarSkillDepotExcelConfigData"
            | "AvatarSkillExcelConfigData"
            | "AvatarTalentExcelConfigData"
            | "DungeonEntryExcelConfigData"
            | "DungeonLevelEntityConfigData"
            | "EquipAffixExcelConfigData"
            | "FetterInfoExcelConfigData"
            | "FettersExcelConfigData"
            | "FetterStoryExcelConfigData"
            | "ManualTextMapConfigData"
            | "MaterialExcelConfigData"
            | "MonsterCurveExcelConfigData"
            | "MonsterDescribeExcelConfigData"
            | "MonsterExcelConfigData"
            | "ProudSkillExcelConfigData"
            | "ProfilePictureExcelConfigData"
            | "ReliquaryAffixExcelConfigData"
            | "ReliquaryExcelConfigData"
            | "ReliquaryLevelExcelConfigData"
            | "ReliquaryMainPropExcelConfigData"
            | "ReliquarySetExcelConfigData"
            | "TowerFloorExcelConfigData"
            | "TowerLevelExcelConfigData"
            | "TowerScheduleExcelConfigData"
            | "WeaponCurveExcelConfigData"
            | "WeaponExcelConfigData"
            | "WeaponPromoteExcelConfigData">

        ExcelBinOutput names

      Returns Promise<boolean>

      Returns true if an error occurs

    • Change cached languages

      Parameters

      • language:
            | "EN"
            | "RU"
            | "VI"
            | "TH"
            | "PT"
            | "KR"
            | "JP"
            | "ID"
            | "FR"
            | "ES"
            | "DE"
            | "CHT"
            | "CHS"

        Country code

      Returns Promise<boolean>

      Returns true if an error occurs

    • Update cache

      Returns Promise<void>

      await Client.updateCache()