File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,18 @@ class Client {
284284 * })
285285 * .catch(console.log)
286286 */
287-
287+ /**
288+ * Allows you to get player count along with the player count of each public game
289+ * @method
290+ * @name Client#getGameCounts
291+ * @param {MethodOptions } [options={}] Options
292+ * @return {Promise<GameCounts> }
293+ * @example
294+ * hypixel.getGameCounts().then((gameCounts) => {
295+ * console.log(gameCounts.mainLobby.players);
296+ * })
297+ * .catch(console.log)
298+ */
288299 /**
289300 * Delete x (by default all) cache entries
290301 * @param {?number } amount Amount of cache to delete
Original file line number Diff line number Diff line change @@ -8,10 +8,6 @@ class GameCounts {
88 * @param {object } data
99 */
1010 constructor ( data ) {
11- /**
12- * Current player count
13- * @type {number }
14- */
1511 /**
1612 * Player count in Main lobby
1713 * @name GameCounts#mainLobby
@@ -132,6 +128,10 @@ class GameCounts {
132128 * @name GameCounts#queue
133129 * @type {object }
134130 */
131+ /**
132+ * Current player count
133+ * @type {number }
134+ */
135135 this . playerCount = data . playerCount ;
136136 for ( const game in data . games ) {
137137 if ( Object . prototype . hasOwnProperty . call ( data . games , game ) ) {
Original file line number Diff line number Diff line change @@ -228,6 +228,9 @@ declare module 'hypixel-api-reborn' {
228228 * @description Allows you to get list of products
229229 */
230230 getSkyblockBazaar ( options ?: methodOptions ) : Promise < Product [ ] > ;
231+ /**
232+ * @description Allows you to get skyblock news
233+ */
231234 getSkyblockNews ( options ?: methodOptions ) : Promise < SkyblockNews > ;
232235 /**
233236 * @description Allows you to get player's network status
@@ -250,6 +253,10 @@ declare module 'hypixel-api-reborn' {
250253 * @description Allows you to get recent games of a player
251254 */
252255 getRecentGames ( options ?: methodOptions ) : Promise < RecentGame [ ] > ;
256+ /**
257+ * @description Allows you to get player count along with the player count of each public game
258+ */
259+ getGameCounts ( options ?: methodOptions ) : Promise < GameCounts > ;
253260 /**
254261 * @param ip - Valid IP/Hostname address
255262 * @description Pings the minecraft server of hypixel by default
You can’t perform that action at this time.
0 commit comments