Class: DailyModule
DailyModule class provides methods to interact with Genshin Impact's daily module endpoints.
Constructors
constructor
• new DailyModule(request
, lang
, game
, region
)
Parameters
Name | Type |
---|---|
request | HTTPRequest |
lang | LanguageEnum |
game | GamesEnum |
region | null | string |
Defined in
Properties
dailyInfoUrl
• Private
dailyInfoUrl: string
Defined in
dailyRewardUrl
• Private
dailyRewardUrl: string
Defined in
dailySignUrl
• Private
dailySignUrl: string
Defined in
game
• Private
game: GamesEnum
Defined in
lang
• Private
lang: LanguageEnum
Defined in
region
• Private
region: null
| string
Defined in
request
• Private
request: HTTPRequest
Defined in
Methods
claim
▸ claim(): Promise
<IDailyClaim
>
Claim the daily rewards.
Returns
Promise
<IDailyClaim
>
The claim information.
Defined in
info
▸ info(): Promise
<IDailyInfo
>
Retrieves daily information.
Returns
Promise
<IDailyInfo
>
A promise that resolves to an IDailyInfo object.
Defined in
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
rewards
▸ rewards(): Promise
<IDailyRewards
>
Retrieve daily rewards information.
Returns
Promise
<IDailyRewards
>
A promise that resolves to an IDailyRewards object.