Skip to main content

Class: DailyModule

DailyModule class provides methods to interact with Genshin Impact's daily module endpoints.

Constructors

constructor

new DailyModule(request, lang, game, region)

Parameters

NameType
requestHTTPRequest
langLanguageEnum
gameGamesEnum
regionnull | string

Defined in

src/module/daily/daily.ts:25

Properties

dailyInfoUrl

Private dailyInfoUrl: string

Defined in

src/module/daily/daily.ts:21


dailyRewardUrl

Private dailyRewardUrl: string

Defined in

src/module/daily/daily.ts:22


dailySignUrl

Private dailySignUrl: string

Defined in

src/module/daily/daily.ts:23


game

Private game: GamesEnum

Defined in

src/module/daily/daily.ts:28


lang

Private lang: LanguageEnum

Defined in

src/module/daily/daily.ts:27


region

Private region: null | string

Defined in

src/module/daily/daily.ts:29


request

Private request: HTTPRequest

Defined in

src/module/daily/daily.ts:26

Methods

claim

claim(): Promise<IDailyClaim>

Claim the daily rewards.

Returns

Promise<IDailyClaim>

The claim information.

Defined in

src/module/daily/daily.ts:208


info

info(): Promise<IDailyInfo>

Retrieves daily information.

Returns

Promise<IDailyInfo>

A promise that resolves to an IDailyInfo object.

Defined in

src/module/daily/daily.ts:41


reward

reward(day?): Promise<IDailyReward>

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

Throws

  • If the specified day is not a valid date in the current month or if the reward for the specified day is undefined.

Parameters

NameTypeDefault valueDescription
daynull | numbernullThe day to retrieve the reward for. If null, retrieve the reward for the current day.

Returns

Promise<IDailyReward>

  • A promise that resolves with the daily reward for the specified day or the current day

Defined in

src/module/daily/daily.ts:170


rewards

rewards(): Promise<IDailyRewards>

Retrieve daily rewards information.

Returns

Promise<IDailyRewards>

A promise that resolves to an IDailyRewards object.

Defined in

src/module/daily/daily.ts:108