# Class: Genshin

The GenshinImpact namespace provides a collection of methods to interact with the Genshin Impact game.

Alias

GenshinImpact

See

GenshinImpact

Deprecated

Use GenshinImpact class instead.

# Hierarchy

# Table of contents

# Constructors

# Properties

# Methods

# Constructors

# constructor

new Genshin(options)

Constructs a new Genshin object.

# Parameters

Name Type Description
options IGenshinOptions The options object used to configure the object.

# Inherited from

GenshinImpact.constructor

# Defined in

src/games/gi/gi.ts:78 (opens new window)

# Properties

Readonly cookie: ICookie

The cookie object to be used in requests.

# Inherited from

GenshinImpact.cookie

# Defined in

src/games/gi/gi.ts:48 (opens new window)


# daily

Readonly daily: DailyModule

The DailyModule object provides an interface to interact with the daily check-in feature in Genshin Impact.

# Inherited from

GenshinImpact.daily

# Defined in

src/games/gi/gi.ts:25 (opens new window)


# diary

Readonly diary: DiaryModule

The DiaryModule object provides an interface to interact with the user diary feature in Genshin Impact.

# Inherited from

GenshinImpact.diary

# Defined in

src/games/gi/gi.ts:43 (opens new window)


# lang

lang: LanguageEnum

The language to be used in requests.

# Inherited from

GenshinImpact.lang

# Defined in

src/games/gi/gi.ts:68 (opens new window)


# record

Readonly record: RecordModule

The RecordModule object provides an interface to interact with the user record feature in Genshin Impact.

# Inherited from

GenshinImpact.record

# Defined in

src/games/gi/gi.ts:37 (opens new window)


# redeem

Readonly redeem: RedeemModule

The RedeemModule object provides an interface to interact with the code redemption feature in Genshin Impact.

# Inherited from

GenshinImpact.redeem

# Defined in

src/games/gi/gi.ts:31 (opens new window)


# region

region: null | string

The region of the user, if available.

# Inherited from

GenshinImpact.region

# Defined in

src/games/gi/gi.ts:63 (opens new window)


# request

Readonly request: Request

The Request object used to make requests.

# Inherited from

GenshinImpact.request

# Defined in

src/games/gi/gi.ts:53 (opens new window)


# uid

uid: null | number

The UID of the user, if available.

# Inherited from

GenshinImpact.uid

# Defined in

src/games/gi/gi.ts:58 (opens new window)

# Methods

# characters

characters(): Promise<IGenshinCharacters>

Retrieves the Genshin characters of the user.

Alias

Genshin.record.characters()

Deprecated

Use through Genshin.record.characters() instead

# Returns

Promise<IGenshinCharacters>

# Inherited from

GenshinImpact.characters

# Defined in

src/games/gi/gi.ts:156 (opens new window)


# charactersSummary

charactersSummary(characterIds): Promise<IGenshinCharacterSummary>

Returns the summary information of Genshin Impact game characters

Alias

Genshin.record.charactersSummary()

Deprecated

Use through Genshin.record.charactersSummary() instead

# Parameters

Name Type Description
characterIds number[] number[] Characters ID

# Returns

Promise<IGenshinCharacterSummary>

# Inherited from

GenshinImpact.charactersSummary

# Defined in

src/games/gi/gi.ts:167 (opens new window)


# dailyClaim

dailyClaim(): Promise<IDailyClaim>

Claim current reward

Alias

Genshin.daily.claim()

Deprecated

Use through Genshin.daily.claim() instead

# Returns

Promise<IDailyClaim>

# Inherited from

GenshinImpact.dailyClaim

# Defined in

src/games/gi/gi.ts:257 (opens new window)


# dailyInfo

dailyInfo(): Promise<IDailyInfo>

Retrieves daily information.

Alias

Genshin.daily.info()

Deprecated

Use through Genshin.daily.info() instead

# Returns

Promise<IDailyInfo>

# Inherited from

GenshinImpact.dailyInfo

# Defined in

src/games/gi/gi.ts:226 (opens new window)


# dailyNote

dailyNote(): Promise<IGenshinDailyNote>

Retrieve the daily note information for a Genshin Impact user.

Alias

Genshin.record.dailyNote()

Deprecated

Use through Genshin.record.dailyNote() instead

# Returns

Promise<IGenshinDailyNote>

# Inherited from

GenshinImpact.dailyNote

# Defined in

src/games/gi/gi.ts:190 (opens new window)


# dailyReward

dailyReward(day?): Promise<IDailyReward>

Get the daily reward for a specific day or the current day

Alias

Genshin.daily.reward()

Deprecated

Use through Genshin.daily.reward() instead

# Parameters

Name Type Default value Description
day null | number null number | null

# Returns

Promise<IDailyReward>

# Inherited from

GenshinImpact.dailyReward

# Defined in

src/games/gi/gi.ts:247 (opens new window)


# dailyRewards

dailyRewards(): Promise<IDailyRewards>

Retrieve daily rewards information.

Alias

Genshin.daily.rewards()

Deprecated

Use through Genshin.daily.rewards() instead

# Returns

Promise<IDailyRewards>

# Inherited from

GenshinImpact.dailyRewards

# Defined in

src/games/gi/gi.ts:236 (opens new window)


# diaries

diaries(month?): Promise<IGenshinDiaryInfo>

Returns the diary information of a given month for a user

Alias

Genshin.diary.diaries()

Deprecated

Use through Genshin.diary.diaries() instead

# Parameters

Name Type Default value
month DiaryMonthEnum DiaryMonthEnum.CURRENT

# Returns

Promise<IGenshinDiaryInfo>

# Inherited from

GenshinImpact.diaries

# Defined in

src/games/gi/gi.ts:201 (opens new window)


# diaryDetail

diaryDetail(type, month?): Promise<IGenshinDiaryDetail>

Returns the diary details of a given type and month for a user

Alias

Genshin.diary.detail()

Deprecated

Use through Genshin.diary.detail() instead

# Parameters

Name Type Default value Description
type DiaryEnum undefined DiaryEnum
month DiaryMonthEnum DiaryMonthEnum.CURRENT DiaryMonthEnum

# Returns

Promise<IGenshinDiaryDetail>

# Inherited from

GenshinImpact.diaryDetail

# Defined in

src/games/gi/gi.ts:213 (opens new window)


# records

records(): Promise<IGenshinRecord>

Get user's Genshin Impact record

Alias

Genshin.record.records()

Deprecated

Use through Genshin.record.records() instead

# Returns

Promise<IGenshinRecord>

# Inherited from

GenshinImpact.records

# Defined in

src/games/gi/gi.ts:146 (opens new window)


# redeemCode

redeemCode(code): Promise<IRedeemCode>

Redeems a code for a specific account.

Alias

Genshin.redeem.claim()

Deprecated

Use through Genshin.redeem.claim() instead

# Parameters

Name Type Description
code string string

# Returns

Promise<IRedeemCode>

# Inherited from

GenshinImpact.redeemCode

# Defined in

src/games/gi/gi.ts:268 (opens new window)


# spiralAbyss

spiralAbyss(scheduleType?): Promise<IGenshinSpiralAbyss>

Retrieves information about the player's performance in the Spiral Abyss.

Alias

Genshin.record.spiralAbyss()

Deprecated

Use through Genshin.record.spiralAbyss() instead

# Parameters

Name Type Default value Description
scheduleType AbyssScheduleEnum AbyssScheduleEnum.CURRENT AbyssScheduleEnum

# Returns

Promise<IGenshinSpiralAbyss>

# Inherited from

GenshinImpact.spiralAbyss

# Defined in

src/games/gi/gi.ts:178 (opens new window)


# create

Static create(options): Promise<GenshinImpact>

Create a new instance of the GenshinImpact class asynchronously.

# Parameters

Name Type Description
options IGenshinOptions The options object used to configure the object.

# Returns

Promise<GenshinImpact>

A promise that resolves with a new Genshin instance.

# Inherited from

GenshinImpact.create

# Defined in

src/games/gi/gi.ts:127 (opens new window)