# Class: DailyModule
DailyModule class provides methods to interact with Genshin Impact's daily module endpoints.
# Table of contents
# Constructors
# Properties
# Methods
# Constructors
# constructor
• new DailyModule(request
, lang
, game
)
# Parameters
Name | Type |
---|---|
request | Request |
lang | LanguageEnum |
game | GamesEnum |
# Defined in
src/modules/daily/daily.ts:25 (opens new window)
# Properties
# dailyInfoUrl
• Private
dailyInfoUrl: string
# Defined in
src/modules/daily/daily.ts:21 (opens new window)
# dailyRewardUrl
• Private
dailyRewardUrl: string
# Defined in
src/modules/daily/daily.ts:22 (opens new window)
# dailySignUrl
• Private
dailySignUrl: string
# Defined in
src/modules/daily/daily.ts:23 (opens new window)
# game
• Private
game: GamesEnum
# Defined in
src/modules/daily/daily.ts:28 (opens new window)
# lang
• Private
lang: LanguageEnum
# Defined in
src/modules/daily/daily.ts:27 (opens new window)
# request
• Private
request: Request
# Defined in
src/modules/daily/daily.ts:26 (opens new window)
# Methods
# claim
▸ claim(): Promise
<IDailyClaim
>
Claim the daily rewards.
# Returns
Promise
<IDailyClaim
>
The claim information.
# Defined in
src/modules/daily/daily.ts:165 (opens new window)
# info
▸ info(): Promise
<IDailyInfo
>
Retrieves daily information.
# Returns
Promise
<IDailyInfo
>
A promise that resolves to an IDailyInfo object.
# Defined in
src/modules/daily/daily.ts:52 (opens new window)
# 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
Name | Type | Default value | Description |
---|---|---|---|
day | null | number | null | The 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/modules/daily/daily.ts:129 (opens new window)
# rewards
▸ rewards(): Promise
<IDailyRewards
>
Retrieve daily rewards information.
# Returns
Promise
<IDailyRewards
>
A promise that resolves to an IDailyRewards object.