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:29

Properties

dailyInfoUrl

Private dailyInfoUrl: string

Defined in

src/module/daily/daily.ts:25


dailyRewardUrl

Private dailyRewardUrl: string

Defined in

src/module/daily/daily.ts:26


dailySignUrl

Private dailySignUrl: string

Defined in

src/module/daily/daily.ts:27


game

Private game: GamesEnum

Defined in

src/module/daily/daily.ts:32


lang

Private lang: LanguageEnum

Defined in

src/module/daily/daily.ts:31


region

Private region: null | string

Defined in

src/module/daily/daily.ts:33


request

Private request: HTTPRequest

Defined in

src/module/daily/daily.ts:30

Methods

claim

claim(): Promise<IDailyClaim>

Claim the daily rewards.

Returns

Promise<IDailyClaim>

The claim information.

Defined in

src/module/daily/daily.ts:212


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:45


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:174


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:112