Skip to content

Commit

Permalink
Merge pull request #155 from AKASGaming/master
Browse files Browse the repository at this point in the history
Added Rewards to Player Class
  • Loading branch information
StavZ authored May 6, 2021
2 parents 29f932f + b6dd2a5 commit 178058a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/structures/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,31 @@ class Player {
* @type {number | null}
*/
this.lastDailyRewardTimestamp = data.lastAdsenseGenerateTime || null;
/**
* Total amount of Daily Rewards
* @type {number | null}
*/
this.totalRewards = data.totalRewards || null;
/**
* Total amount of Daily Rewards claimed
* @type {number | null}
*/
this.totalDailyRewards = data.totalDailyRewards || null;
/**
* Honestly no clue what this is specifically
* @type {number | null}
*/
this.rewardStreak = data.rewardStreak || null;
/**
* Current Daily Rewards streak
* @type {number | null}
*/
this.rewardScore = data.rewardScore || null;
/**
* Highest Daily Rewards streak
* @type {number | null}
*/
this.rewardHighScore = data.rewardHighScore || null;
/**
* Player recent games
* @return {Promise<Array<RecentGame>>}
Expand Down
7 changes: 7 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,13 @@ declare module 'hypixel-api-reborn' {
giftBundlesReceived?: number;
isOnline: boolean;
userLanguage: string;
lastDailyReward?: Date;
lastDailyRewardTimestamp?: number;
totalRewards?: number;
totalDailyRewards?: number;
rewardStreak?: number;
rewardScore?: number;
rewardHighScore?: number;
claimedLevelingRewards: number[];
globalCosmetics: PlayerCosmetics;
ranksPurchaseTime: {
Expand Down

0 comments on commit 178058a

Please sign in to comment.