hypixel-api-reborn 11.3.4 → 12.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.github/ISSUE_TEMPLATE/Bug_report.md +9 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +25 -0
- package/.github/SECURITY.md +21 -0
- package/.github/labels.yml +24 -0
- package/.github/workflows/ci-cd.yml +126 -0
- package/.vscode/extensions.json +10 -0
- package/README.md +0 -63
- package/dist/API/getAchievements.d.ts +10 -0
- package/dist/API/getAchievements.js +22 -0
- package/dist/API/getAchievements.js.map +1 -0
- package/dist/API/getActiveHouses.d.ts +10 -0
- package/dist/API/getActiveHouses.js +22 -0
- package/dist/API/getActiveHouses.js.map +1 -0
- package/dist/API/getBoosters.d.ts +10 -0
- package/dist/API/getBoosters.js +22 -0
- package/dist/API/getBoosters.js.map +1 -0
- package/dist/API/getChallenges.d.ts +10 -0
- package/dist/API/getChallenges.js +22 -0
- package/dist/API/getChallenges.js.map +1 -0
- package/dist/API/getGameCounts.d.ts +10 -0
- package/dist/API/getGameCounts.js +22 -0
- package/dist/API/getGameCounts.js.map +1 -0
- package/dist/API/getGuild.d.ts +10 -0
- package/dist/API/getGuild.js +36 -0
- package/dist/API/getGuild.js.map +1 -0
- package/dist/API/getGuildAchievements.d.ts +10 -0
- package/dist/API/getGuildAchievements.js +22 -0
- package/dist/API/getGuildAchievements.js.map +1 -0
- package/dist/API/getHouse.d.ts +10 -0
- package/dist/API/getHouse.js +24 -0
- package/dist/API/getHouse.js.map +1 -0
- package/dist/API/getLeaderboards.d.ts +9 -0
- package/dist/API/getLeaderboards.js +32 -0
- package/dist/API/getLeaderboards.js.map +1 -0
- package/dist/API/getPlayer.d.ts +10 -0
- package/dist/API/getPlayer.js +37 -0
- package/dist/API/getPlayer.js.map +1 -0
- package/dist/API/getPlayerHouses.d.ts +10 -0
- package/dist/API/getPlayerHouses.js +25 -0
- package/dist/API/getPlayerHouses.js.map +1 -0
- package/dist/API/getQuests.d.ts +10 -0
- package/dist/API/getQuests.js +22 -0
- package/dist/API/getQuests.js.map +1 -0
- package/dist/API/getRecentGames.d.ts +10 -0
- package/dist/API/getRecentGames.js +25 -0
- package/dist/API/getRecentGames.js.map +1 -0
- package/dist/API/getSkyblockAuction.d.ts +10 -0
- package/dist/API/getSkyblockAuction.js +38 -0
- package/dist/API/getSkyblockAuction.js.map +1 -0
- package/dist/API/getSkyblockAuctions.d.ts +24 -0
- package/dist/API/getSkyblockAuctions.js +57 -0
- package/dist/API/getSkyblockAuctions.js.map +1 -0
- package/dist/API/getSkyblockAuctionsByPlayer.d.ts +10 -0
- package/dist/API/getSkyblockAuctionsByPlayer.js +25 -0
- package/dist/API/getSkyblockAuctionsByPlayer.js.map +1 -0
- package/dist/API/getSkyblockBazaar.d.ts +10 -0
- package/dist/API/getSkyblockBazaar.js +22 -0
- package/dist/API/getSkyblockBazaar.js.map +1 -0
- package/dist/API/getSkyblockBingo.d.ts +10 -0
- package/dist/API/getSkyblockBingo.js +22 -0
- package/dist/API/getSkyblockBingo.js.map +1 -0
- package/dist/API/getSkyblockFireSales.d.ts +10 -0
- package/dist/API/getSkyblockFireSales.js +22 -0
- package/dist/API/getSkyblockFireSales.js.map +1 -0
- package/dist/API/getSkyblockGarden.d.ts +10 -0
- package/dist/API/getSkyblockGarden.js +24 -0
- package/dist/API/getSkyblockGarden.js.map +1 -0
- package/dist/API/getSkyblockGovernment.d.ts +10 -0
- package/dist/API/getSkyblockGovernment.js +22 -0
- package/dist/API/getSkyblockGovernment.js.map +1 -0
- package/dist/API/getSkyblockMember.d.ts +10 -0
- package/dist/API/getSkyblockMember.js +46 -0
- package/dist/API/getSkyblockMember.js.map +1 -0
- package/dist/API/getSkyblockMuseum.d.ts +10 -0
- package/dist/API/getSkyblockMuseum.js +25 -0
- package/dist/API/getSkyblockMuseum.js.map +1 -0
- package/dist/API/getSkyblockNews.d.ts +10 -0
- package/dist/API/getSkyblockNews.js +22 -0
- package/dist/API/getSkyblockNews.js.map +1 -0
- package/dist/API/getSkyblockProfiles.d.ts +10 -0
- package/dist/API/getSkyblockProfiles.js +47 -0
- package/dist/API/getSkyblockProfiles.js.map +1 -0
- package/dist/API/getStatus.d.ts +10 -0
- package/dist/API/getStatus.js +23 -0
- package/dist/API/getStatus.js.map +1 -0
- package/dist/API/getWatchdogStats.d.ts +10 -0
- package/dist/API/getWatchdogStats.js +22 -0
- package/dist/API/getWatchdogStats.js.map +1 -0
- package/dist/API/index.d.ts +57 -0
- package/dist/API/index.js +62 -0
- package/dist/API/index.js.map +1 -0
- package/dist/Client.d.ts +29 -0
- package/dist/Client.js +76 -0
- package/dist/Client.js.map +1 -0
- package/dist/Errors.d.ts +27 -0
- package/dist/Errors.js +31 -0
- package/dist/Errors.js.map +1 -0
- package/dist/Private/CacheHandler.d.ts +14 -0
- package/dist/Private/CacheHandler.js +37 -0
- package/dist/Private/CacheHandler.js.map +1 -0
- package/dist/Private/Endpoint.d.ts +7 -0
- package/dist/Private/Endpoint.js +13 -0
- package/dist/Private/Endpoint.js.map +1 -0
- package/dist/Private/RateLimit.d.ts +13 -0
- package/dist/Private/RateLimit.js +33 -0
- package/dist/Private/RateLimit.js.map +1 -0
- package/dist/Private/Requests.d.ts +29 -0
- package/dist/Private/Requests.js +112 -0
- package/dist/Private/Requests.js.map +1 -0
- package/dist/Private/Updater.d.ts +11 -0
- package/dist/Private/Updater.js +47 -0
- package/dist/Private/Updater.js.map +1 -0
- package/dist/index.d.ts +115 -0
- package/dist/index.js +132 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +66 -0
- package/dist/src/API/getAchievements.js +16 -0
- package/dist/src/API/getAchievements.test.js +74 -0
- package/dist/src/API/getActiveHouses.js +16 -0
- package/dist/src/API/getActiveHouses.test.js +43 -0
- package/dist/src/API/getBoosters.js +16 -0
- package/dist/src/API/getBoosters.test.js +72 -0
- package/dist/src/API/getChallenges.js +16 -0
- package/dist/src/API/getChallenges.test.js +51 -0
- package/dist/src/API/getGameCounts.js +16 -0
- package/dist/src/API/getGameCounts.test.js +26 -0
- package/dist/src/API/getGuild.js +30 -0
- package/dist/src/API/getGuild.test.js +508 -0
- package/dist/src/API/getGuildAchievements.js +16 -0
- package/dist/src/API/getGuildAchievements.test.js +51 -0
- package/dist/src/API/getHouse.js +18 -0
- package/dist/src/API/getHouse.test.js +51 -0
- package/dist/src/API/getLeaderboards.js +23 -0
- package/dist/src/API/getLeaderboards.test.js +55 -0
- package/dist/src/API/getPlayer.js +31 -0
- package/dist/src/API/getPlayer.test.js +290 -0
- package/dist/src/API/getPlayerHouses.js +19 -0
- package/dist/src/API/getPlayerHouses.test.js +50 -0
- package/dist/src/API/getQuests.js +16 -0
- package/dist/src/API/getQuests.test.js +48 -0
- package/dist/src/API/getRecentGames.js +19 -0
- package/dist/src/API/getRecentGames.test.js +52 -0
- package/dist/src/API/getSkyblockAuction.js +32 -0
- package/dist/src/API/getSkyblockAuction.test.js +382 -0
- package/dist/src/API/getSkyblockAuctions.js +51 -0
- package/dist/src/API/getSkyblockAuctions.test.js +366 -0
- package/dist/src/API/getSkyblockAuctionsByPlayer.js +19 -0
- package/dist/src/API/getSkyblockAuctionsByPlayer.test.js +207 -0
- package/dist/src/API/getSkyblockBazaar.js +16 -0
- package/dist/src/API/getSkyblockBazaar.test.js +51 -0
- package/dist/src/API/getSkyblockBingo.js +16 -0
- package/dist/src/API/getSkyblockBingo.test.js +40 -0
- package/dist/src/API/getSkyblockFireSales.js +16 -0
- package/dist/src/API/getSkyblockFireSales.test.js +55 -0
- package/dist/src/API/getSkyblockGarden.js +18 -0
- package/dist/src/API/getSkyblockGarden.test.js +43 -0
- package/dist/src/API/getSkyblockGovernment.js +16 -0
- package/dist/src/API/getSkyblockGovernment.test.js +60 -0
- package/dist/src/API/getSkyblockMember.js +40 -0
- package/dist/src/API/getSkyblockMember.test.js +648 -0
- package/dist/src/API/getSkyblockMuseum.js +19 -0
- package/dist/src/API/getSkyblockMuseum.test.js +78 -0
- package/dist/src/API/getSkyblockNews.js +16 -0
- package/dist/src/API/getSkyblockNews.test.js +35 -0
- package/dist/src/API/getSkyblockProfiles.js +41 -0
- package/dist/src/API/getSkyblockProfiles.test.js +121 -0
- package/dist/src/API/getStatus.js +17 -0
- package/dist/src/API/getStatus.test.js +57 -0
- package/dist/src/API/getWatchdogStats.js +16 -0
- package/dist/src/API/getWatchdogStats.test.js +37 -0
- package/dist/src/API/index.js +56 -0
- package/dist/src/Client.js +70 -0
- package/dist/src/Client.test.js +115 -0
- package/dist/src/Errors.js +28 -0
- package/dist/src/Private/CacheHandler.js +31 -0
- package/dist/src/Private/CacheHandler.test.js +37 -0
- package/dist/src/Private/Endpoint.js +10 -0
- package/dist/src/Private/Endpoint.test.js +17 -0
- package/dist/src/Private/RateLimit.js +30 -0
- package/dist/src/Private/RateLimit.test.js +73 -0
- package/dist/src/Private/Requests.js +106 -0
- package/dist/src/Private/Requests.test.js +48 -0
- package/dist/src/Private/Updater.js +41 -0
- package/dist/src/Private/Updater.test.js +52 -0
- package/dist/src/index.js +34 -0
- package/dist/src/structures/Boosters/Booster.js +38 -0
- package/dist/src/structures/Boosters/Booster.test.js +7 -0
- package/dist/src/structures/Color.js +73 -0
- package/dist/src/structures/Color.test.js +23 -0
- package/dist/src/structures/Game.js +31 -0
- package/dist/src/structures/GameCounts.js +23 -0
- package/dist/src/structures/Guild/Guild.js +61 -0
- package/dist/src/structures/Guild/GuildMember.js +30 -0
- package/dist/src/structures/Guild/GuildRank.js +20 -0
- package/dist/src/structures/House.js +22 -0
- package/dist/src/structures/House.test.js +24 -0
- package/dist/src/structures/ItemBytes.js +10 -0
- package/dist/src/structures/Leaderboard.js +17 -0
- package/dist/src/structures/Leaderboard.test.js +25 -0
- package/dist/src/structures/MiniGames/Arcade.js +437 -0
- package/dist/src/structures/MiniGames/Arcade.test.js +643 -0
- package/dist/src/structures/MiniGames/ArenaBrawl.js +48 -0
- package/dist/src/structures/MiniGames/ArenaBrawl.test.js +120 -0
- package/dist/src/structures/MiniGames/BedWars.js +299 -0
- package/dist/src/structures/MiniGames/BedWars.test.js +936 -0
- package/dist/src/structures/MiniGames/BlitzSurvivalGames.js +170 -0
- package/dist/src/structures/MiniGames/BlitzSurvivalGames.test.js +2238 -0
- package/dist/src/structures/MiniGames/BuildBattle.js +27 -0
- package/dist/src/structures/MiniGames/BuildBattle.test.js +42 -0
- package/dist/src/structures/MiniGames/CopsAndCrims.js +126 -0
- package/dist/src/structures/MiniGames/CopsAndCrims.test.js +162 -0
- package/dist/src/structures/MiniGames/Duels.js +466 -0
- package/dist/src/structures/MiniGames/Duels.test.js +1853 -0
- package/dist/src/structures/MiniGames/MegaWalls.js +194 -0
- package/dist/src/structures/MiniGames/MegaWalls.test.js +4790 -0
- package/dist/src/structures/MiniGames/MurderMystery.js +84 -0
- package/dist/src/structures/MiniGames/MurderMystery.test.js +241 -0
- package/dist/src/structures/MiniGames/Paintball.js +36 -0
- package/dist/src/structures/MiniGames/Paintball.test.js +51 -0
- package/dist/src/structures/MiniGames/Pit.js +124 -0
- package/dist/src/structures/MiniGames/Pit.test.js +218 -0
- package/dist/src/structures/MiniGames/PitInventoryItem.js +19 -0
- package/dist/src/structures/MiniGames/Quakecraft.js +68 -0
- package/dist/src/structures/MiniGames/Quakecraft.test.js +105 -0
- package/dist/src/structures/MiniGames/SkyWars.js +264 -0
- package/dist/src/structures/MiniGames/Skywars.test.js +413 -0
- package/dist/src/structures/MiniGames/SmashHeroes.js +110 -0
- package/dist/src/structures/MiniGames/SmashHeroes.test.js +647 -0
- package/dist/src/structures/MiniGames/SpeedUHC.js +72 -0
- package/dist/src/structures/MiniGames/SpeedUHC.test.js +245 -0
- package/dist/src/structures/MiniGames/TNTGames.js +120 -0
- package/dist/src/structures/MiniGames/TNTGames.test.js +139 -0
- package/dist/src/structures/MiniGames/TurboKartRacers.js +57 -0
- package/dist/src/structures/MiniGames/TurboKartRacers.test.js +140 -0
- package/dist/src/structures/MiniGames/UHC.js +109 -0
- package/dist/src/structures/MiniGames/UHC.test.js +180 -0
- package/dist/src/structures/MiniGames/VampireZ.js +38 -0
- package/dist/src/structures/MiniGames/VampireZ.test.js +59 -0
- package/dist/src/structures/MiniGames/Walls.js +22 -0
- package/dist/src/structures/MiniGames/Walls.test.js +32 -0
- package/dist/src/structures/MiniGames/Warlords.js +76 -0
- package/dist/src/structures/MiniGames/Warlords.test.js +405 -0
- package/dist/src/structures/MiniGames/WoolWars.js +81 -0
- package/dist/src/structures/MiniGames/WoolWars.test.js +251 -0
- package/dist/src/structures/Pet.js +38 -0
- package/dist/src/structures/Pets.js +14 -0
- package/dist/src/structures/Player.js +147 -0
- package/dist/src/structures/Player.test.js +96 -0
- package/dist/src/structures/PlayerCosmetics.js +53 -0
- package/dist/src/structures/RecentGame.js +25 -0
- package/dist/src/structures/SkyBlock/Auctions/Auction.js +39 -0
- package/dist/src/structures/SkyBlock/Auctions/AuctionInfo.js +15 -0
- package/dist/src/structures/SkyBlock/Auctions/BaseAuction.js +19 -0
- package/dist/src/structures/SkyBlock/Auctions/BaseAuction.test.js +20 -0
- package/dist/src/structures/SkyBlock/Auctions/Bid.js +20 -0
- package/dist/src/structures/SkyBlock/Bazaar/Order.js +16 -0
- package/dist/src/structures/SkyBlock/Bazaar/Order.test.js +23 -0
- package/dist/src/structures/SkyBlock/Bazaar/Product.js +23 -0
- package/dist/src/structures/SkyBlock/Bazaar/Product.test.js +46 -0
- package/dist/src/structures/SkyBlock/News/SkyblockNews.js +32 -0
- package/dist/src/structures/SkyBlock/SkyblockGarden.js +62 -0
- package/dist/src/structures/SkyBlock/SkyblockGarden.test.js +22 -0
- package/dist/src/structures/SkyBlock/SkyblockInventoryItem.js +78 -0
- package/dist/src/structures/SkyBlock/SkyblockMember.js +406 -0
- package/dist/src/structures/SkyBlock/SkyblockMember.test.js +71 -0
- package/dist/src/structures/SkyBlock/SkyblockMuseum.js +29 -0
- package/dist/src/structures/SkyBlock/SkyblockMuseumItem.js +24 -0
- package/dist/src/structures/SkyBlock/SkyblockPet.js +27 -0
- package/dist/src/structures/SkyBlock/SkyblockProfile.js +36 -0
- package/dist/src/structures/SkyBlock/Static/Bingo.js +49 -0
- package/dist/src/structures/SkyBlock/Static/BingoData.js +19 -0
- package/dist/src/structures/SkyBlock/Static/Candidate.js +19 -0
- package/dist/src/structures/SkyBlock/Static/FireSale.js +22 -0
- package/dist/src/structures/SkyBlock/Static/Government.js +33 -0
- package/dist/src/structures/SkyBlock/Static/Perk.js +9 -0
- package/dist/src/structures/Static/Achievement.js +44 -0
- package/dist/src/structures/Static/AchievementTier.js +14 -0
- package/dist/src/structures/Static/Achievements.js +15 -0
- package/dist/src/structures/Static/Challenges.js +15 -0
- package/dist/src/structures/Static/GameAchievements.js +14 -0
- package/dist/src/structures/Static/GameChallenges.js +18 -0
- package/dist/src/structures/Static/GameQuests.js +10 -0
- package/dist/src/structures/Static/GuildAchievements.js +15 -0
- package/dist/src/structures/Static/Quest.js +24 -0
- package/dist/src/structures/Static/Quests.js +15 -0
- package/dist/src/structures/Status.js +17 -0
- package/dist/src/structures/Status.test.js +18 -0
- package/dist/src/structures/WatchdogStats.js +15 -0
- package/dist/src/structures/WatchdogStats.test.js +23 -0
- package/dist/src/utils/Constants.js +2170 -0
- package/dist/src/utils/Guild.js +71 -0
- package/dist/src/utils/Player.js +88 -0
- package/dist/src/utils/Player.test.js +82 -0
- package/dist/src/utils/SkyblockUtils.js +342 -0
- package/dist/src/utils/SkyblockUtils.test.js +8 -0
- package/dist/src/utils/divide.js +6 -0
- package/dist/src/utils/divide.test.js +12 -0
- package/dist/src/utils/isGuildID.js +3 -0
- package/dist/src/utils/isGuildID.test.js +16 -0
- package/dist/src/utils/isUUID.js +5 -0
- package/dist/src/utils/isUUID.test.js +31 -0
- package/dist/src/utils/oscillation.js +13 -0
- package/dist/src/utils/oscillation.test.js +17 -0
- package/dist/src/utils/removeSnakeCase.js +14 -0
- package/dist/src/utils/romanize.js +41 -0
- package/dist/src/utils/romanize.test.js +8 -0
- package/dist/structures/Boosters/Booster.d.ts +17 -0
- package/dist/structures/Boosters/Booster.js +44 -0
- package/dist/structures/Boosters/Booster.js.map +1 -0
- package/dist/structures/Color.d.ts +9 -0
- package/dist/structures/Color.js +76 -0
- package/dist/structures/Color.js.map +1 -0
- package/dist/structures/Game.d.ts +16 -0
- package/dist/structures/Game.js +35 -0
- package/dist/structures/Game.js.map +1 -0
- package/dist/structures/GameCounts.d.ts +7 -0
- package/dist/structures/GameCounts.js +29 -0
- package/dist/structures/GameCounts.js.map +1 -0
- package/dist/structures/Guild/Guild.d.ts +39 -0
- package/dist/structures/Guild/Guild.js +67 -0
- package/dist/structures/Guild/Guild.js.map +1 -0
- package/dist/structures/Guild/GuildMember.d.ts +15 -0
- package/dist/structures/Guild/GuildMember.js +33 -0
- package/dist/structures/Guild/GuildMember.js.map +1 -0
- package/dist/structures/Guild/GuildRank.d.ts +11 -0
- package/dist/structures/Guild/GuildRank.js +23 -0
- package/dist/structures/Guild/GuildRank.js.map +1 -0
- package/dist/structures/House.d.ts +12 -0
- package/dist/structures/House.js +25 -0
- package/dist/structures/House.js.map +1 -0
- package/dist/structures/ItemBytes.d.ts +7 -0
- package/dist/structures/ItemBytes.js +17 -0
- package/dist/structures/ItemBytes.js.map +1 -0
- package/dist/structures/Leaderboard.d.ts +8 -0
- package/dist/structures/Leaderboard.js +16 -0
- package/dist/structures/Leaderboard.js.map +1 -0
- package/dist/structures/MiniGames/Arcade.d.ts +234 -0
- package/dist/structures/MiniGames/Arcade.js +466 -0
- package/dist/structures/MiniGames/Arcade.js.map +1 -0
- package/dist/structures/MiniGames/ArenaBrawl.d.ts +26 -0
- package/dist/structures/MiniGames/ArenaBrawl.js +54 -0
- package/dist/structures/MiniGames/ArenaBrawl.js.map +1 -0
- package/dist/structures/MiniGames/BedWars.d.ts +116 -0
- package/dist/structures/MiniGames/BedWars.js +300 -0
- package/dist/structures/MiniGames/BedWars.js.map +1 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.d.ts +87 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.js +176 -0
- package/dist/structures/MiniGames/BlitzSurvivalGames.js.map +1 -0
- package/dist/structures/MiniGames/BuildBattle.d.ts +18 -0
- package/dist/structures/MiniGames/BuildBattle.js +33 -0
- package/dist/structures/MiniGames/BuildBattle.js.map +1 -0
- package/dist/structures/MiniGames/CopsAndCrims.d.ts +67 -0
- package/dist/structures/MiniGames/CopsAndCrims.js +132 -0
- package/dist/structures/MiniGames/CopsAndCrims.js.map +1 -0
- package/dist/structures/MiniGames/Duels.d.ts +188 -0
- package/dist/structures/MiniGames/Duels.js +473 -0
- package/dist/structures/MiniGames/Duels.js.map +1 -0
- package/dist/structures/MiniGames/MegaWalls.d.ts +99 -0
- package/dist/structures/MiniGames/MegaWalls.js +200 -0
- package/dist/structures/MiniGames/MegaWalls.js.map +1 -0
- package/dist/structures/MiniGames/MurderMystery.d.ts +44 -0
- package/dist/structures/MiniGames/MurderMystery.js +90 -0
- package/dist/structures/MiniGames/MurderMystery.js.map +1 -0
- package/dist/structures/MiniGames/Paintball.d.ts +19 -0
- package/dist/structures/MiniGames/Paintball.js +42 -0
- package/dist/structures/MiniGames/Paintball.js.map +1 -0
- package/dist/structures/MiniGames/Pit.d.ts +41 -0
- package/dist/structures/MiniGames/Pit.js +138 -0
- package/dist/structures/MiniGames/Pit.js.map +1 -0
- package/dist/structures/MiniGames/PitInventoryItem.d.ts +10 -0
- package/dist/structures/MiniGames/PitInventoryItem.js +20 -0
- package/dist/structures/MiniGames/PitInventoryItem.js.map +1 -0
- package/dist/structures/MiniGames/Quakecraft.d.ts +35 -0
- package/dist/structures/MiniGames/Quakecraft.js +74 -0
- package/dist/structures/MiniGames/Quakecraft.js.map +1 -0
- package/dist/structures/MiniGames/SkyWars.d.ts +112 -0
- package/dist/structures/MiniGames/SkyWars.js +272 -0
- package/dist/structures/MiniGames/SkyWars.js.map +1 -0
- package/dist/structures/MiniGames/SmashHeroes.d.ts +58 -0
- package/dist/structures/MiniGames/SmashHeroes.js +116 -0
- package/dist/structures/MiniGames/SmashHeroes.js.map +1 -0
- package/dist/structures/MiniGames/SpeedUHC.d.ts +36 -0
- package/dist/structures/MiniGames/SpeedUHC.js +74 -0
- package/dist/structures/MiniGames/SpeedUHC.js.map +1 -0
- package/dist/structures/MiniGames/TNTGames.d.ts +66 -0
- package/dist/structures/MiniGames/TNTGames.js +126 -0
- package/dist/structures/MiniGames/TNTGames.js.map +1 -0
- package/dist/structures/MiniGames/TurboKartRacers.d.ts +31 -0
- package/dist/structures/MiniGames/TurboKartRacers.js +60 -0
- package/dist/structures/MiniGames/TurboKartRacers.js.map +1 -0
- package/dist/structures/MiniGames/UHC.d.ts +31 -0
- package/dist/structures/MiniGames/UHC.js +115 -0
- package/dist/structures/MiniGames/UHC.js.map +1 -0
- package/dist/structures/MiniGames/VampireZ.d.ts +21 -0
- package/dist/structures/MiniGames/VampireZ.js +44 -0
- package/dist/structures/MiniGames/VampireZ.js.map +1 -0
- package/dist/structures/MiniGames/Walls.d.ts +12 -0
- package/dist/structures/MiniGames/Walls.js +28 -0
- package/dist/structures/MiniGames/Walls.js.map +1 -0
- package/dist/structures/MiniGames/Warlords.d.ts +40 -0
- package/dist/structures/MiniGames/Warlords.js +82 -0
- package/dist/structures/MiniGames/Warlords.js.map +1 -0
- package/dist/structures/MiniGames/WoolWars.d.ts +49 -0
- package/dist/structures/MiniGames/WoolWars.js +87 -0
- package/dist/structures/MiniGames/WoolWars.js.map +1 -0
- package/dist/structures/Pet.d.ts +19 -0
- package/dist/structures/Pet.js +41 -0
- package/dist/structures/Pet.js.map +1 -0
- package/dist/structures/Pets.d.ts +38 -0
- package/dist/structures/Pets.js +20 -0
- package/dist/structures/Pets.js.map +1 -0
- package/dist/structures/Player.d.ts +73 -0
- package/dist/structures/Player.js +158 -0
- package/dist/structures/Player.js.map +1 -0
- package/dist/structures/PlayerCosmetics.d.ts +26 -0
- package/dist/structures/PlayerCosmetics.js +120 -0
- package/dist/structures/PlayerCosmetics.js.map +1 -0
- package/dist/structures/RecentGame.d.ts +13 -0
- package/dist/structures/RecentGame.js +30 -0
- package/dist/structures/RecentGame.js.map +1 -0
- package/dist/structures/ServerInfo.d.ts +20 -0
- package/dist/structures/ServerInfo.js +34 -0
- package/dist/structures/ServerInfo.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/Auction.d.ts +22 -0
- package/dist/structures/SkyBlock/Auctions/Auction.js +45 -0
- package/dist/structures/SkyBlock/Auctions/Auction.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.d.ts +10 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.js +21 -0
- package/dist/structures/SkyBlock/Auctions/AuctionInfo.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.d.ts +11 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.js +25 -0
- package/dist/structures/SkyBlock/Auctions/BaseAuction.js.map +1 -0
- package/dist/structures/SkyBlock/Auctions/Bid.d.ts +11 -0
- package/dist/structures/SkyBlock/Auctions/Bid.js +23 -0
- package/dist/structures/SkyBlock/Auctions/Bid.js.map +1 -0
- package/dist/structures/SkyBlock/Bazzar/Order.d.ts +9 -0
- package/dist/structures/SkyBlock/Bazzar/Order.js +19 -0
- package/dist/structures/SkyBlock/Bazzar/Order.js.map +1 -0
- package/dist/structures/SkyBlock/Bazzar/Product.d.ts +19 -0
- package/dist/structures/SkyBlock/Bazzar/Product.js +33 -0
- package/dist/structures/SkyBlock/Bazzar/Product.js.map +1 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.d.ts +10 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.js +35 -0
- package/dist/structures/SkyBlock/News/SkyblockNews.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockGarden.d.ts +60 -0
- package/dist/structures/SkyBlock/SkyblockGarden.js +65 -0
- package/dist/structures/SkyBlock/SkyblockGarden.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.d.ts +38 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.js +83 -0
- package/dist/structures/SkyBlock/SkyblockInventoryItem.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMember.d.ts +80 -0
- package/dist/structures/SkyBlock/SkyblockMember.js +288 -0
- package/dist/structures/SkyBlock/SkyblockMember.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.d.ts +10 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.js +35 -0
- package/dist/structures/SkyBlock/SkyblockMuseum.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.d.ts +11 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.js +30 -0
- package/dist/structures/SkyBlock/SkyblockMuseumItem.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockPet.d.ts +15 -0
- package/dist/structures/SkyBlock/SkyblockPet.js +33 -0
- package/dist/structures/SkyBlock/SkyblockPet.js.map +1 -0
- package/dist/structures/SkyBlock/SkyblockProfile.d.ts +14 -0
- package/dist/structures/SkyBlock/SkyblockProfile.js +42 -0
- package/dist/structures/SkyBlock/SkyblockProfile.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Bingo.d.ts +16 -0
- package/dist/structures/SkyBlock/Static/Bingo.js +52 -0
- package/dist/structures/SkyBlock/Static/Bingo.js.map +1 -0
- package/dist/structures/SkyBlock/Static/BingoData.d.ts +10 -0
- package/dist/structures/SkyBlock/Static/BingoData.js +25 -0
- package/dist/structures/SkyBlock/Static/BingoData.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Candidate.d.ts +11 -0
- package/dist/structures/SkyBlock/Static/Candidate.js +25 -0
- package/dist/structures/SkyBlock/Static/Candidate.js.map +1 -0
- package/dist/structures/SkyBlock/Static/FireSale.d.ts +12 -0
- package/dist/structures/SkyBlock/Static/FireSale.js +25 -0
- package/dist/structures/SkyBlock/Static/FireSale.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Government.d.ts +13 -0
- package/dist/structures/SkyBlock/Static/Government.js +39 -0
- package/dist/structures/SkyBlock/Static/Government.js.map +1 -0
- package/dist/structures/SkyBlock/Static/Perk.d.ts +6 -0
- package/dist/structures/SkyBlock/Static/Perk.js +12 -0
- package/dist/structures/SkyBlock/Static/Perk.js.map +1 -0
- package/dist/structures/Static/Achievement.d.ts +14 -0
- package/dist/structures/Static/Achievement.js +50 -0
- package/dist/structures/Static/Achievement.js.map +1 -0
- package/dist/structures/Static/AchievementTier.d.ts +7 -0
- package/dist/structures/Static/AchievementTier.js +17 -0
- package/dist/structures/Static/AchievementTier.js.map +1 -0
- package/dist/structures/Static/Achievements.d.ts +9 -0
- package/dist/structures/Static/Achievements.js +21 -0
- package/dist/structures/Static/Achievements.js.map +1 -0
- package/dist/structures/Static/Challenges.d.ts +9 -0
- package/dist/structures/Static/Challenges.js +21 -0
- package/dist/structures/Static/Challenges.js.map +1 -0
- package/dist/structures/Static/GameAchievements.d.ts +10 -0
- package/dist/structures/Static/GameAchievements.js +20 -0
- package/dist/structures/Static/GameAchievements.js.map +1 -0
- package/dist/structures/Static/GameChallenges.d.ts +13 -0
- package/dist/structures/Static/GameChallenges.js +21 -0
- package/dist/structures/Static/GameChallenges.js.map +1 -0
- package/dist/structures/Static/GameQuests.d.ts +8 -0
- package/dist/structures/Static/GameQuests.js +16 -0
- package/dist/structures/Static/GameQuests.js.map +1 -0
- package/dist/structures/Static/GuildAchievements.d.ts +8 -0
- package/dist/structures/Static/GuildAchievements.js +21 -0
- package/dist/structures/Static/GuildAchievements.js.map +1 -0
- package/dist/structures/Static/Quest.d.ts +20 -0
- package/dist/structures/Static/Quest.js +27 -0
- package/dist/structures/Static/Quest.js.map +1 -0
- package/dist/structures/Static/Quests.d.ts +9 -0
- package/dist/structures/Static/Quests.js +21 -0
- package/dist/structures/Static/Quests.js.map +1 -0
- package/dist/structures/Status.d.ts +10 -0
- package/dist/structures/Status.js +23 -0
- package/dist/structures/Status.js.map +1 -0
- package/dist/structures/Watchdog/Stats.d.ts +9 -0
- package/dist/structures/Watchdog/Stats.js +18 -0
- package/dist/structures/Watchdog/Stats.js.map +1 -0
- package/dist/utils/Constants.d.ts +1017 -0
- package/dist/utils/Constants.js +2197 -0
- package/dist/utils/Constants.js.map +1 -0
- package/dist/utils/Guild.d.ts +15 -0
- package/dist/utils/Guild.js +85 -0
- package/dist/utils/Guild.js.map +1 -0
- package/dist/utils/Player.d.ts +8 -0
- package/dist/utils/Player.js +98 -0
- package/dist/utils/Player.js.map +1 -0
- package/dist/utils/SkyblockUtils.d.ts +131 -0
- package/dist/utils/SkyblockUtils.js +394 -0
- package/dist/utils/SkyblockUtils.js.map +1 -0
- package/dist/utils/divide.d.ts +1 -0
- package/dist/utils/divide.js +10 -0
- package/dist/utils/divide.js.map +1 -0
- package/dist/utils/isGuildID.d.ts +1 -0
- package/dist/utils/isGuildID.js +7 -0
- package/dist/utils/isGuildID.js.map +1 -0
- package/dist/utils/isUUID.d.ts +1 -0
- package/dist/utils/isUUID.js +9 -0
- package/dist/utils/isUUID.js.map +1 -0
- package/dist/utils/oscillation.d.ts +2 -0
- package/dist/utils/oscillation.js +15 -0
- package/dist/utils/oscillation.js.map +1 -0
- package/dist/utils/removeSnakeCase.d.ts +3 -0
- package/dist/utils/removeSnakeCase.js +20 -0
- package/dist/utils/removeSnakeCase.js.map +1 -0
- package/dist/utils/romanize.d.ts +1 -0
- package/dist/utils/romanize.js +45 -0
- package/dist/utils/romanize.js.map +1 -0
- package/{eslint.config.mjs → eslint.config.js} +16 -14
- package/package.json +32 -25
- package/renovate.json +21 -0
- package/src/API/API.d.ts +16 -0
- package/src/API/getAchievements.test.ts +81 -0
- package/src/API/getAchievements.ts +20 -0
- package/src/API/getActiveHouses.test.ts +45 -0
- package/src/API/getActiveHouses.ts +20 -0
- package/src/API/getBoosters.test.ts +53 -0
- package/src/API/getBoosters.ts +20 -0
- package/src/API/getChallenges.test.ts +54 -0
- package/src/API/getChallenges.ts +19 -0
- package/src/API/getGameCounts.test.ts +28 -0
- package/src/API/getGameCounts.ts +20 -0
- package/src/API/getGuild.test.ts +478 -0
- package/src/API/getGuild.ts +35 -0
- package/src/API/getGuildAchievements.test.ts +59 -0
- package/src/API/getGuildAchievements.ts +20 -0
- package/src/API/getHouse.test.ts +55 -0
- package/src/API/getHouse.ts +21 -0
- package/src/API/getLeaderboards.test.ts +41 -0
- package/src/API/getLeaderboards.ts +30 -0
- package/src/API/getPlayer.test.ts +494 -0
- package/src/API/getPlayer.ts +33 -0
- package/src/API/getPlayerHouses.test.ts +53 -0
- package/src/API/getPlayerHouses.ts +22 -0
- package/src/API/getQuests.test.ts +51 -0
- package/src/API/getQuests.ts +20 -0
- package/src/API/getRecentGames.test.ts +51 -0
- package/src/API/getRecentGames.ts +22 -0
- package/src/API/getSkyblockAuction.test.ts +293 -0
- package/src/API/getSkyblockAuction.ts +36 -0
- package/src/API/getSkyblockAuctions.test.ts +346 -0
- package/src/API/getSkyblockAuctions.ts +59 -0
- package/src/API/getSkyblockAuctionsByPlayer.test.ts +249 -0
- package/src/API/getSkyblockAuctionsByPlayer.ts +22 -0
- package/src/API/getSkyblockBazaar.test.ts +52 -0
- package/src/API/getSkyblockBazaar.ts +20 -0
- package/src/API/getSkyblockBingo.test.ts +42 -0
- package/src/API/getSkyblockBingo.ts +20 -0
- package/src/API/getSkyblockFireSales.test.ts +43 -0
- package/src/API/getSkyblockFireSales.ts +20 -0
- package/src/API/getSkyblockGarden.test.ts +60 -0
- package/src/API/getSkyblockGarden.ts +21 -0
- package/src/API/getSkyblockGovernment.test.ts +78 -0
- package/src/API/getSkyblockGovernment.ts +20 -0
- package/src/API/getSkyblockMember.test.ts +308 -0
- package/src/API/getSkyblockMember.ts +45 -0
- package/src/API/getSkyblockMuseum.test.ts +91 -0
- package/src/API/getSkyblockMuseum.ts +22 -0
- package/src/API/getSkyblockNews.test.ts +45 -0
- package/src/API/getSkyblockNews.ts +20 -0
- package/src/API/getSkyblockProfiles.test.ts +164 -0
- package/src/API/getSkyblockProfiles.ts +43 -0
- package/src/API/getStatus.test.ts +42 -0
- package/src/API/getStatus.ts +21 -0
- package/src/API/getWatchdogStats.test.ts +44 -0
- package/src/API/getWatchdogStats.ts +20 -0
- package/src/API/index.ts +56 -0
- package/src/Client.test.ts +148 -0
- package/src/Client.ts +91 -0
- package/src/Errors.ts +42 -0
- package/src/Private/CacheHandler.test.ts +49 -0
- package/src/Private/CacheHandler.ts +41 -0
- package/src/Private/Endpoint.test.ts +23 -0
- package/src/Private/Endpoint.ts +14 -0
- package/src/Private/RateLimit.test.ts +99 -0
- package/src/Private/RateLimit.ts +38 -0
- package/src/Private/Requests.test.ts +59 -0
- package/src/Private/Requests.ts +128 -0
- package/src/Private/Updater.test.ts +68 -0
- package/src/Private/Updater.ts +48 -0
- package/src/index.ts +119 -0
- package/src/structures/Boosters/Booster.ts +40 -0
- package/src/structures/Color.ts +79 -0
- package/src/structures/Game.ts +147 -0
- package/src/structures/GameCounts.ts +26 -0
- package/src/structures/Guild/Guild.ts +67 -0
- package/src/structures/Guild/GuildMember.ts +33 -0
- package/src/structures/Guild/GuildRank.ts +22 -0
- package/src/structures/House.ts +24 -0
- package/src/structures/ItemBytes.ts +18 -0
- package/src/structures/Leaderboard.ts +14 -0
- package/src/structures/MiniGames/Arcade.ts +460 -0
- package/src/structures/MiniGames/ArenaBrawl.ts +51 -0
- package/src/structures/MiniGames/{BedWars.js → BedWars.ts} +198 -298
- package/src/structures/MiniGames/BlitzSurvivalGames.ts +173 -0
- package/src/structures/MiniGames/BuildBattle.ts +36 -0
- package/src/structures/MiniGames/CopsAndCrims.ts +131 -0
- package/src/structures/MiniGames/{Duels.js → Duels.ts} +200 -737
- package/src/structures/MiniGames/MegaWalls.ts +197 -0
- package/src/structures/MiniGames/MurderMystery.ts +87 -0
- package/src/structures/MiniGames/Paintball.ts +38 -0
- package/src/structures/MiniGames/Pit.ts +139 -0
- package/src/structures/MiniGames/PitInventoryItem.ts +18 -0
- package/src/structures/MiniGames/Quakecraft.ts +70 -0
- package/src/structures/MiniGames/SkyWars.ts +288 -0
- package/src/structures/MiniGames/SmashHeroes.ts +114 -0
- package/src/structures/MiniGames/SpeedUHC.ts +71 -0
- package/src/structures/MiniGames/TNTGames.ts +126 -0
- package/src/structures/MiniGames/TurboKartRacers.ts +59 -0
- package/src/structures/MiniGames/{UHC.js → UHC.ts} +32 -114
- package/src/structures/MiniGames/VampireZ.ts +41 -0
- package/src/structures/MiniGames/Walls.ts +24 -0
- package/src/structures/MiniGames/Warlords.ts +79 -0
- package/src/structures/MiniGames/WoolWars.ts +106 -0
- package/src/structures/Pet.ts +40 -0
- package/src/structures/Pets.ts +46 -0
- package/src/structures/Player.ts +199 -0
- package/src/structures/{PlayerCosmetics.js → PlayerCosmetics.ts} +36 -63
- package/src/structures/RecentGame.ts +27 -0
- package/src/structures/ServerInfo.ts +40 -0
- package/src/structures/SkyBlock/Auctions/Auction.ts +43 -0
- package/src/structures/SkyBlock/Auctions/AuctionInfo.ts +20 -0
- package/src/structures/SkyBlock/Auctions/BaseAuction.ts +22 -0
- package/src/structures/SkyBlock/Auctions/Bid.ts +22 -0
- package/src/structures/SkyBlock/Bazzar/Order.ts +18 -0
- package/src/structures/SkyBlock/Bazzar/Product.ts +40 -0
- package/src/structures/SkyBlock/News/SkyblockNews.ts +35 -0
- package/src/structures/SkyBlock/SkyblockGarden.ts +118 -0
- package/src/structures/SkyBlock/SkyblockInventoryItem.ts +83 -0
- package/src/structures/SkyBlock/SkyblockMember.ts +317 -0
- package/src/structures/SkyBlock/SkyblockMuseum.ts +43 -0
- package/src/structures/SkyBlock/SkyblockMuseumItem.ts +26 -0
- package/src/structures/SkyBlock/SkyblockPet.ts +30 -0
- package/src/structures/SkyBlock/SkyblockProfile.ts +42 -0
- package/src/structures/SkyBlock/Static/Bingo.ts +50 -0
- package/src/structures/SkyBlock/Static/BingoData.ts +21 -0
- package/src/structures/SkyBlock/Static/Candidate.ts +22 -0
- package/src/structures/SkyBlock/Static/FireSale.ts +24 -0
- package/src/structures/SkyBlock/Static/Government.ts +42 -0
- package/src/structures/SkyBlock/Static/Perk.ts +10 -0
- package/src/structures/Static/Achievement.ts +49 -0
- package/src/structures/Static/AchievementTier.ts +18 -0
- package/src/structures/Static/Achievements.ts +20 -0
- package/src/structures/Static/Challenges.ts +20 -0
- package/src/structures/Static/GameAchievements.ts +19 -0
- package/src/structures/Static/GameChallenges.ts +28 -0
- package/src/structures/Static/GameQuests.ts +13 -0
- package/src/structures/Static/GuildAchievements.ts +19 -0
- package/src/structures/Static/Quest.ts +37 -0
- package/src/structures/Static/Quests.ts +20 -0
- package/src/structures/Status.ts +20 -0
- package/src/structures/Watchdog/Stats.ts +16 -0
- package/src/typings/index.d.ts +24 -0
- package/src/utils/{Constants.js → Constants.ts} +201 -1248
- package/src/utils/Guild.ts +90 -0
- package/src/utils/Player.ts +93 -0
- package/src/utils/SkyblockUtils.test.ts +9 -0
- package/src/utils/SkyblockUtils.ts +516 -0
- package/src/utils/divide.test.ts +13 -0
- package/src/utils/{divide.js → divide.ts} +2 -2
- package/src/utils/isGuildID.test.ts +19 -0
- package/src/utils/isGuildID.ts +3 -0
- package/src/utils/isUUID.test.ts +35 -0
- package/src/utils/{isUUID.js → isUUID.ts} +2 -2
- package/src/utils/oscillation.ts +11 -0
- package/src/utils/removeSnakeCase.ts +18 -0
- package/src/utils/romanize.test.ts +9 -0
- package/src/utils/{romanize.js → romanize.ts} +3 -4
- package/tsconfig.json +25 -0
- package/vitest.config.ts +8 -0
- package/vitest.setup.ts +2 -0
- package/src/API/getAPIStatus.js +0 -8
- package/src/API/getAchievements.js +0 -7
- package/src/API/getBoosters.js +0 -7
- package/src/API/getChallenges.js +0 -7
- package/src/API/getGameCounts.js +0 -7
- package/src/API/getGuild.js +0 -19
- package/src/API/getGuildAchievements.js +0 -7
- package/src/API/getLeaderboards.js +0 -15
- package/src/API/getPlayer.js +0 -23
- package/src/API/getQuests.js +0 -7
- package/src/API/getRecentGames.js +0 -14
- package/src/API/getServerInfo.js +0 -71
- package/src/API/getStatus.js +0 -9
- package/src/API/getWatchdogStats.js +0 -7
- package/src/API/housing/getActiveHouses.js +0 -7
- package/src/API/housing/getHouse.js +0 -9
- package/src/API/housing/getPlayerHouses.js +0 -11
- package/src/API/index.js +0 -35
- package/src/API/skyblock/getAuction.js +0 -21
- package/src/API/skyblock/getAuctions.js +0 -74
- package/src/API/skyblock/getAuctionsByPlayer.js +0 -11
- package/src/API/skyblock/getBazaar.js +0 -8
- package/src/API/skyblock/getBingo.js +0 -7
- package/src/API/skyblock/getBingoByPlayer.js +0 -14
- package/src/API/skyblock/getEndedAuctions.js +0 -11
- package/src/API/skyblock/getFireSales.js +0 -7
- package/src/API/skyblock/getGarden.js +0 -11
- package/src/API/skyblock/getGovernment.js +0 -7
- package/src/API/skyblock/getMember.js +0 -35
- package/src/API/skyblock/getMuseum.js +0 -15
- package/src/API/skyblock/getNews.js +0 -7
- package/src/API/skyblock/getProfiles.js +0 -49
- package/src/Client.js +0 -547
- package/src/Errors.js +0 -66
- package/src/Private/defaultCache.js +0 -77
- package/src/Private/rateLimit.js +0 -83
- package/src/Private/requests.js +0 -76
- package/src/Private/updater.js +0 -34
- package/src/Private/uuidCache.js +0 -30
- package/src/Private/validate.js +0 -108
- package/src/index.js +0 -96
- package/src/structures/APIIncident.js +0 -71
- package/src/structures/APIStatus.js +0 -46
- package/src/structures/Boosters/Booster.js +0 -84
- package/src/structures/Color.js +0 -174
- package/src/structures/Game.js +0 -166
- package/src/structures/GameCounts.js +0 -151
- package/src/structures/Guild/Guild.js +0 -191
- package/src/structures/Guild/GuildMember.js +0 -66
- package/src/structures/Guild/GuildRank.js +0 -48
- package/src/structures/House.js +0 -54
- package/src/structures/ItemBytes.js +0 -33
- package/src/structures/Leaderboard.js +0 -31
- package/src/structures/MiniGames/Arcade.js +0 -1058
- package/src/structures/MiniGames/ArenaBrawl.js +0 -118
- package/src/structures/MiniGames/BlitzSurvivalGames.js +0 -424
- package/src/structures/MiniGames/BuildBattle.js +0 -64
- package/src/structures/MiniGames/CopsAndCrims.js +0 -318
- package/src/structures/MiniGames/MegaWalls.js +0 -478
- package/src/structures/MiniGames/MurderMystery.js +0 -214
- package/src/structures/MiniGames/Paintball.js +0 -87
- package/src/structures/MiniGames/Pit.js +0 -247
- package/src/structures/MiniGames/PitInventoryItem.js +0 -43
- package/src/structures/MiniGames/Quakecraft.js +0 -164
- package/src/structures/MiniGames/SkyWars.js +0 -669
- package/src/structures/MiniGames/SmashHeroes.js +0 -272
- package/src/structures/MiniGames/SpeedUHC.js +0 -168
- package/src/structures/MiniGames/TNTGames.js +0 -285
- package/src/structures/MiniGames/TurboKartRacers.js +0 -141
- package/src/structures/MiniGames/VampireZ.js +0 -93
- package/src/structures/MiniGames/Walls.js +0 -52
- package/src/structures/MiniGames/Warlords.js +0 -187
- package/src/structures/MiniGames/WoolWars.js +0 -174
- package/src/structures/Pet.js +0 -96
- package/src/structures/Pets.js +0 -64
- package/src/structures/Player.js +0 -346
- package/src/structures/RecentGame.js +0 -57
- package/src/structures/ServerInfo.js +0 -78
- package/src/structures/SkyBlock/Auctions/Auction.js +0 -106
- package/src/structures/SkyBlock/Auctions/AuctionInfo.js +0 -56
- package/src/structures/SkyBlock/Auctions/BaseAuction.js +0 -46
- package/src/structures/SkyBlock/Auctions/Bid.js +0 -49
- package/src/structures/SkyBlock/Auctions/PartialAuction.js +0 -26
- package/src/structures/SkyBlock/Bazzar/Order.js +0 -38
- package/src/structures/SkyBlock/Bazzar/Product.js +0 -53
- package/src/structures/SkyBlock/News/SkyblockNews.js +0 -60
- package/src/structures/SkyBlock/PlayerBingo.js +0 -49
- package/src/structures/SkyBlock/SkyblockGarden.js +0 -146
- package/src/structures/SkyBlock/SkyblockInventoryItem.js +0 -168
- package/src/structures/SkyBlock/SkyblockMember.js +0 -591
- package/src/structures/SkyBlock/SkyblockMuseum.js +0 -60
- package/src/structures/SkyBlock/SkyblockMuseumItem.js +0 -54
- package/src/structures/SkyBlock/SkyblockPet.js +0 -71
- package/src/structures/SkyBlock/SkyblockProfile.js +0 -81
- package/src/structures/SkyBlock/Static/Bingo.js +0 -101
- package/src/structures/SkyBlock/Static/BingoData.js +0 -45
- package/src/structures/SkyBlock/Static/Candidate.js +0 -50
- package/src/structures/SkyBlock/Static/FireSale.js +0 -55
- package/src/structures/SkyBlock/Static/Government.js +0 -79
- package/src/structures/SkyBlock/Static/Perk.js +0 -23
- package/src/structures/Static/Achievement.js +0 -87
- package/src/structures/Static/AchievementTier.js +0 -33
- package/src/structures/Static/Achievements.js +0 -30
- package/src/structures/Static/Challenges.js +0 -29
- package/src/structures/Static/GameAchievements.js +0 -36
- package/src/structures/Static/GameChallenges.js +0 -40
- package/src/structures/Static/GameQuests.js +0 -24
- package/src/structures/Static/GuildAchievements.js +0 -34
- package/src/structures/Static/Quest.js +0 -66
- package/src/structures/Static/Quests.js +0 -31
- package/src/structures/Status.js +0 -41
- package/src/structures/Watchdog/Stats.js +0 -36
- package/src/utils/Guild.js +0 -90
- package/src/utils/Player.js +0 -112
- package/src/utils/SkyblockUtils.js +0 -667
- package/src/utils/arrayTools.js +0 -4
- package/src/utils/index.js +0 -14
- package/src/utils/isGuildID.js +0 -3
- package/src/utils/oscillation.js +0 -17
- package/src/utils/removeSnakeCase.js +0 -33
- package/src/utils/rgbToHexColor.js +0 -8
- package/src/utils/toUuid.js +0 -24
- package/src/utils/varInt.js +0 -17
- package/typings/index.d.ts +0 -4297
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
module.exports = async function () {
|
|
2
|
-
const FireSale = require('../../structures/SkyBlock/Static/FireSale');
|
|
3
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
4
|
-
const res = await this._makeRequest('/skyblock/firesales');
|
|
5
|
-
if (res.raw) return res;
|
|
6
|
-
return res.sales.length ? res.sales.map((sale) => new FireSale(sale)) : [];
|
|
7
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
module.exports = async function (profileId) {
|
|
2
|
-
const SkyblockGarden = require('../../structures/SkyBlock/SkyblockGarden');
|
|
3
|
-
let res;
|
|
4
|
-
try {
|
|
5
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
6
|
-
res = await this._makeRequest(`/skyblock/garden?profile=${profileId}`).catch();
|
|
7
|
-
// eslint-disable-next-line no-unused-vars, no-empty
|
|
8
|
-
} catch (e) {}
|
|
9
|
-
if (res?.raw) return res;
|
|
10
|
-
return new SkyblockGarden(res);
|
|
11
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
module.exports = async function () {
|
|
2
|
-
const GovernmentData = require('../../structures/SkyBlock/Static/Government.js');
|
|
3
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
4
|
-
const res = await this._makeRequest('/resources/skyblock/election');
|
|
5
|
-
if (res.raw) return res;
|
|
6
|
-
return new GovernmentData(res);
|
|
7
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const Errors = require('../../Errors');
|
|
2
|
-
const toUuid = require('../../utils/toUuid');
|
|
3
|
-
const getPlayer = require('../getPlayer');
|
|
4
|
-
module.exports = async function (query, options = { fetchPlayer: false, getMuseum: false, getGarden: false }) {
|
|
5
|
-
const SkyblockMember = require('../../structures/SkyBlock/SkyblockMember');
|
|
6
|
-
const getSkyblockMuseum = require('./getMuseum');
|
|
7
|
-
const getSkyblockGarden = require('./getGarden');
|
|
8
|
-
if (!query) throw new Error(Errors.NO_NICKNAME_UUID);
|
|
9
|
-
query = await toUuid(query, this.options.mojangCacheTime, this.options.useThirdPartyAPI);
|
|
10
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
11
|
-
const res = await this._makeRequest(`/skyblock/profiles?uuid=${query}`);
|
|
12
|
-
if (res.raw) return res;
|
|
13
|
-
if (!res.profiles || !res.profiles.length) throw new Error(Errors.NO_SKYBLOCK_PROFILES);
|
|
14
|
-
const player = options.fetchPlayer ? await getPlayer.call(this, query, options) : null;
|
|
15
|
-
const memberByProfileName = new Map();
|
|
16
|
-
for (const profile of res.profiles) {
|
|
17
|
-
profile.members[query].player = player;
|
|
18
|
-
memberByProfileName.set(
|
|
19
|
-
profile.cute_name,
|
|
20
|
-
new SkyblockMember({
|
|
21
|
-
uuid: query,
|
|
22
|
-
profileId: profile.profile_id,
|
|
23
|
-
profileName: profile.cute_name,
|
|
24
|
-
gameMode: profile.game_mode || null,
|
|
25
|
-
m: profile.members[query],
|
|
26
|
-
banking: profile.banking,
|
|
27
|
-
communityUpgrades: profile.community_upgrades,
|
|
28
|
-
museum: options.getMuseum ? await getSkyblockMuseum.call(this, query, profile.profile_id) : null,
|
|
29
|
-
garden: options.getGarden ? await getSkyblockGarden.call(this, profile.profile_id) : null,
|
|
30
|
-
selected: profile.selected
|
|
31
|
-
})
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
return memberByProfileName;
|
|
35
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const Errors = require('../../Errors');
|
|
2
|
-
const toUuid = require('../../utils/toUuid');
|
|
3
|
-
module.exports = async function (query, profileId) {
|
|
4
|
-
const SkyblockMuseum = require('../../structures/SkyBlock/SkyblockMuseum');
|
|
5
|
-
if (!query) throw new Error(Errors.NO_NICKNAME_UUID);
|
|
6
|
-
query = await toUuid(query, this.options.mojangCacheTime, this.options.useThirdPartyAPI);
|
|
7
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
8
|
-
const res = await this._makeRequest(`/skyblock/museum?uuid=${query}&profile=${profileId}`);
|
|
9
|
-
if (res.raw) return res;
|
|
10
|
-
return new SkyblockMuseum({
|
|
11
|
-
uuid: query,
|
|
12
|
-
m: res,
|
|
13
|
-
profileId: profileId
|
|
14
|
-
});
|
|
15
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const SkyblockNews = require('../../structures/SkyBlock/News/SkyblockNews');
|
|
2
|
-
module.exports = async function () {
|
|
3
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
4
|
-
const res = await this._makeRequest('/skyblock/news');
|
|
5
|
-
if (res.raw) return res;
|
|
6
|
-
return res.items.map((i) => new SkyblockNews(i));
|
|
7
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
const Errors = require('../../Errors');
|
|
2
|
-
const toUuid = require('../../utils/toUuid');
|
|
3
|
-
const getPlayer = require('../getPlayer');
|
|
4
|
-
module.exports = async function (query, options = { fetchPlayer: false, getMuseum: false, getGarden: false }) {
|
|
5
|
-
const SkyblockProfile = require('../../structures/SkyBlock/SkyblockProfile');
|
|
6
|
-
const getSkyblockMuseum = require('./getMuseum');
|
|
7
|
-
const getSkyblockGarden = require('./getGarden');
|
|
8
|
-
if (!query) throw new Error(Errors.NO_NICKNAME_UUID);
|
|
9
|
-
query = await toUuid(query, this.options.mojangCacheTime, this.options.useThirdPartyAPI);
|
|
10
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
11
|
-
const res = await this._makeRequest(`/skyblock/profiles?uuid=${query}`);
|
|
12
|
-
if (res.raw) return res;
|
|
13
|
-
if (!res.profiles || !res.profiles.length) throw new Error(Errors.NO_SKYBLOCK_PROFILES);
|
|
14
|
-
const players = new Map();
|
|
15
|
-
if (options.fetchPlayer) {
|
|
16
|
-
const uniqueUuids = [...new Set(res.profiles.map((profile) => Object.keys(profile.members)).flat())];
|
|
17
|
-
await Promise.all(
|
|
18
|
-
uniqueUuids.map(async (uuid) => {
|
|
19
|
-
const player = await getPlayer.call(this, uuid, options);
|
|
20
|
-
players.set(uuid, player);
|
|
21
|
-
})
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const profiles = [];
|
|
26
|
-
for (let i = 0; i < res.profiles.length; i++) {
|
|
27
|
-
if (options.fetchPlayer) {
|
|
28
|
-
for (const memberUuid of Object.keys(res.profiles[i].members)) {
|
|
29
|
-
res.profiles[i].members[memberUuid].player = players.get(memberUuid);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
profiles.push({
|
|
34
|
-
uuid: query,
|
|
35
|
-
profileId: res.profiles[i].profile_id,
|
|
36
|
-
profileName: res.profiles[i].cute_name,
|
|
37
|
-
gameMode: res.profiles[i].game_mode || null,
|
|
38
|
-
m: res.profiles[i].members[query],
|
|
39
|
-
banking: res.profiles[i].banking,
|
|
40
|
-
communityUpgrades: res.profiles[i].community_upgrades,
|
|
41
|
-
museum: options.getMuseum ? await getSkyblockMuseum.call(this, query, res.profiles[i].profile_id) : null,
|
|
42
|
-
garden: options.getGarden ? await getSkyblockGarden.call(this, res.profiles[i].profile_id) : null,
|
|
43
|
-
selected: res.profiles[i].selected,
|
|
44
|
-
members: res.profiles[i].members
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return profiles.map((p) => new SkyblockProfile(p));
|
|
49
|
-
};
|
package/src/Client.js
DELETED
|
@@ -1,547 +0,0 @@
|
|
|
1
|
-
const rateLimit = new (require('./Private/rateLimit'))();
|
|
2
|
-
const validate = new (require('./Private/validate'))();
|
|
3
|
-
const updater = new (require('./Private/updater'))();
|
|
4
|
-
const Requests = require('./Private/requests');
|
|
5
|
-
const EventEmitter = require('events');
|
|
6
|
-
const Errors = require('./Errors');
|
|
7
|
-
const API = require('./API/index');
|
|
8
|
-
const clients = [];
|
|
9
|
-
|
|
10
|
-
/* eslint-disable */
|
|
11
|
-
const Player = require('./structures/Player');
|
|
12
|
-
const Guild = require('./structures/Guild/Guild');
|
|
13
|
-
const WatchdogStats = require('./structures/Watchdog/Stats');
|
|
14
|
-
const Booster = require('./structures/Boosters/Booster');
|
|
15
|
-
const SkyblockProfile = require('./structures/SkyBlock/SkyblockProfile');
|
|
16
|
-
const SkyblockMember = require('./structures/SkyBlock/SkyblockMember');
|
|
17
|
-
const SkyblockMuseum = require('./structures/SkyBlock/SkyblockMuseum');
|
|
18
|
-
const SkyblockGarden = require('./structures/SkyBlock/SkyblockGarden');
|
|
19
|
-
const APIStatus = require('./structures/APIStatus');
|
|
20
|
-
const Leaderboard = require('./structures/Leaderboard');
|
|
21
|
-
const ServerInfo = require('./structures/ServerInfo');
|
|
22
|
-
const RecentGame = require('./structures/RecentGame');
|
|
23
|
-
const Status = require('./structures/Status');
|
|
24
|
-
const Auction = require('./structures/SkyBlock/Auctions/Auction');
|
|
25
|
-
const AuctionInfo = require('./structures/SkyBlock/Auctions/AuctionInfo');
|
|
26
|
-
const PartialAuction = require('./structures/SkyBlock/Auctions/PartialAuction');
|
|
27
|
-
const Product = require('./structures/SkyBlock/Bazzar/Product');
|
|
28
|
-
const BingoData = require('./structures/SkyBlock/Static/BingoData');
|
|
29
|
-
const PlayerBingo = require('./structures/SkyBlock/PlayerBingo');
|
|
30
|
-
const GovernmentData = require('./structures/SkyBlock/Static/Government');
|
|
31
|
-
const FireSale = require('./structures/SkyBlock/Static/FireSale');
|
|
32
|
-
const SkyblockNews = require('./structures/SkyBlock/News/SkyblockNews');
|
|
33
|
-
const GameCounts = require('./structures/GameCounts');
|
|
34
|
-
const House = require('./structures/House.js');
|
|
35
|
-
/* eslint-enable */
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Client class
|
|
39
|
-
*/
|
|
40
|
-
class Client extends EventEmitter {
|
|
41
|
-
/**
|
|
42
|
-
* @param {string} key API key
|
|
43
|
-
* @param {ClientOptions} [options={}] Client options
|
|
44
|
-
*/
|
|
45
|
-
constructor(key, options = {}) {
|
|
46
|
-
super();
|
|
47
|
-
this.requests = new Requests(this, options.cacheHandler);
|
|
48
|
-
// eslint-disable-next-line no-console
|
|
49
|
-
if (options && !options.silent) this.on('warn', console.warn);
|
|
50
|
-
// Test to check for multiple instances of client
|
|
51
|
-
if (clients.find((x) => x.key === key)) {
|
|
52
|
-
this.emit('warn', Errors.MULTIPLE_INSTANCES);
|
|
53
|
-
return clients.find((x) => x.key === key);
|
|
54
|
-
}
|
|
55
|
-
validate.validateNodeVersion();
|
|
56
|
-
this.key = validate.validateKey(key);
|
|
57
|
-
this.options = validate.parseOptions(options);
|
|
58
|
-
validate.validateOptions(this.options);
|
|
59
|
-
|
|
60
|
-
for (const func in API) {
|
|
61
|
-
Client.prototype[func] = (...args) => {
|
|
62
|
-
const lastArg = args[args.length - 1];
|
|
63
|
-
return API[func].apply(
|
|
64
|
-
{
|
|
65
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
66
|
-
_makeRequest: this._makeRequest.bind(this, validate.cacheSuboptions(lastArg) ? lastArg : {}),
|
|
67
|
-
...this
|
|
68
|
-
},
|
|
69
|
-
args
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (this.options.checkForUpdates) {
|
|
75
|
-
updater.checkForUpdates().catch(() => {
|
|
76
|
-
// eslint-disable-next-line no-console
|
|
77
|
-
if (!this.options.silent) console.warn('[hypixel-api-reborn] Error whilst checking for updates!');
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* All cache entries
|
|
82
|
-
* @type {Map<string,object>}
|
|
83
|
-
*/
|
|
84
|
-
this.cache = this.requests.cache;
|
|
85
|
-
clients.push(this);
|
|
86
|
-
rateLimit.init(this.getGameCounts(), this.options, this).then(() => this.emit('ready'));
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Private function - make request
|
|
90
|
-
* @param {MethodOptions} options Options for request
|
|
91
|
-
* @param {string} url Endpoint URL to request
|
|
92
|
-
* @param {boolean} [useRateLimitManager=true] Use rate limit
|
|
93
|
-
* @returns {Promise<Object>} Response
|
|
94
|
-
* @private
|
|
95
|
-
*/
|
|
96
|
-
async _makeRequest(options, url, useRateLimitManager = true) {
|
|
97
|
-
if (!url) return;
|
|
98
|
-
if ('/key' !== url && !options.noCacheCheck && (await this.requests.cache.has(url))) {
|
|
99
|
-
return Object.assign(await this.requests.cache.get(url), { raw: Boolean(options.raw) });
|
|
100
|
-
}
|
|
101
|
-
if (useRateLimitManager) await rateLimit.rateLimitManager();
|
|
102
|
-
this.emit('outgoingRequest', url, { ...options, headers: { ...options.headers, ...this.options.headers } });
|
|
103
|
-
const result = await this.requests.request.call(this.requests, url, {
|
|
104
|
-
...options,
|
|
105
|
-
headers: { ...options.headers, ...this.options.headers }
|
|
106
|
-
});
|
|
107
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
108
|
-
if (this.options.syncWithHeaders) rateLimit.sync(result._headers);
|
|
109
|
-
return result;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Emitted when rate limiter is ready. ( You don't have to wait for this event to emit UNLESS you are planning to do data scraping which means spamming requests )
|
|
113
|
-
* @event ready
|
|
114
|
-
* @name Client#ready
|
|
115
|
-
* @example
|
|
116
|
-
* // This example gets player's uuid.
|
|
117
|
-
* hypixel.once('ready',()=>{
|
|
118
|
-
* hypixel.getPlayer('stavzdev')
|
|
119
|
-
* .then(player => player.uuid)
|
|
120
|
-
* .catch(console.log);
|
|
121
|
-
* })
|
|
122
|
-
*/
|
|
123
|
-
/**
|
|
124
|
-
* Emitted when a request is going to be sent
|
|
125
|
-
* @event outgoingRequest
|
|
126
|
-
* @name Client#outgoingRequest
|
|
127
|
-
* @param {string} url URL
|
|
128
|
-
* @param {object} [options] Options, if any
|
|
129
|
-
*/
|
|
130
|
-
/**
|
|
131
|
-
* Emitted when there is a warning.
|
|
132
|
-
* @event warn
|
|
133
|
-
* @name Client#warn
|
|
134
|
-
* @param {string} error Warning Message
|
|
135
|
-
*/
|
|
136
|
-
/**
|
|
137
|
-
* Allows you to get statistics of player
|
|
138
|
-
* @method
|
|
139
|
-
* @name Client#getPlayer
|
|
140
|
-
* @param {string} query Player nickname or UUID
|
|
141
|
-
* @param {PlayerMethodOptions} [options={}] Method options
|
|
142
|
-
* @return {Promise<Player>}
|
|
143
|
-
* @example
|
|
144
|
-
* hypixel.getPlayer('StavZDev').then(player => {
|
|
145
|
-
* console.log(player.level); // 141
|
|
146
|
-
* console.log(player.rank); // 'MVP+'
|
|
147
|
-
* }).catch(e => {
|
|
148
|
-
* console.log(e);
|
|
149
|
-
* })
|
|
150
|
-
* @example
|
|
151
|
-
* // Get player's guild along with player stats
|
|
152
|
-
* hypixel.getPlayer('Minikloon', { guild: true }).then(player => {
|
|
153
|
-
* console.log(player.guild) // null if player isn't is guild
|
|
154
|
-
* console.log(player.guild.name) // Mini Squid
|
|
155
|
-
* console.log(player.guild.level) // 110
|
|
156
|
-
* }).catch(e => {
|
|
157
|
-
* console.log(e);
|
|
158
|
-
* });
|
|
159
|
-
* @example
|
|
160
|
-
* // async/await
|
|
161
|
-
* const player = await hypixel.getPlayer('Minikloon').catch(console.log);
|
|
162
|
-
* // If player doesn't exist, or if an error occurred ( check console )
|
|
163
|
-
* console.log(player); // null
|
|
164
|
-
* // Check if player exists
|
|
165
|
-
* if(player) console.log(player.uuid); // 20934ef9488c465180a78f861586b4cf
|
|
166
|
-
*/
|
|
167
|
-
/**
|
|
168
|
-
* Allows you to get statistics of hypixel guild
|
|
169
|
-
* @method
|
|
170
|
-
* @name Client#getGuild
|
|
171
|
-
* @param {'id'|'name'|'player'} searchParameter Search for guild by id, name or player (if player is in guild)
|
|
172
|
-
* @param {string} query Guild ID, Guild name or player uuid/nickname
|
|
173
|
-
* @param {MethodOptions} [options={}] Method options
|
|
174
|
-
* @return {Promise<Guild>}
|
|
175
|
-
* @example
|
|
176
|
-
* hypixel.getGuild('name', 'The Foundation').then(guild => {
|
|
177
|
-
* console.log(guild.level); // 111
|
|
178
|
-
* console.log(guild.id); // '52e5719284ae51ed0c716c69'
|
|
179
|
-
* }).catch(e => {
|
|
180
|
-
* console.log(e);
|
|
181
|
-
* })
|
|
182
|
-
* @example
|
|
183
|
-
* // async/await
|
|
184
|
-
* const guild = await hypixel.getGuild('name', 'The Foundation').catch(console.log);
|
|
185
|
-
* console.log(guild.level); // 111
|
|
186
|
-
* console.log(guild.id); // '52e5719284ae51ed0c716c69'
|
|
187
|
-
*/
|
|
188
|
-
/**
|
|
189
|
-
* Allows you to get statistics of watchdog, the server anticheat
|
|
190
|
-
* @method
|
|
191
|
-
* @name Client#getWatchdogStats
|
|
192
|
-
* @param {MethodOptions} [options={}] Method options
|
|
193
|
-
* @return {Promise<WatchdogStats>}
|
|
194
|
-
* @example
|
|
195
|
-
* hypixel.getWatchdogStats().then(watchdog => {
|
|
196
|
-
* console.log(watchdog.byWatchdogTotal); // 5931897
|
|
197
|
-
* }).catch(e => {
|
|
198
|
-
* console.log(e);
|
|
199
|
-
* })
|
|
200
|
-
* @example
|
|
201
|
-
* // async/await
|
|
202
|
-
* const watchdog = await hypixel.getWatchdogStats().catch(console.log);
|
|
203
|
-
* console.log(watchdog.byWatchdogTotal); // 5931897
|
|
204
|
-
*/
|
|
205
|
-
/**
|
|
206
|
-
* Allows you to get all active boosters
|
|
207
|
-
* @method
|
|
208
|
-
* @name Client#getBoosters
|
|
209
|
-
* @param {MethodOptions} [options={}] Method options
|
|
210
|
-
* @return {Promise<Array<Booster>>}
|
|
211
|
-
* @example
|
|
212
|
-
* hypixel.getBoosters().then(boosters => {
|
|
213
|
-
* console.log(boosters[0].purchaser); // '978ddb705a8e43618e41749178c020b0'
|
|
214
|
-
* }).catch(e => {
|
|
215
|
-
* console.log(e);
|
|
216
|
-
* })
|
|
217
|
-
* @example
|
|
218
|
-
* // async/await
|
|
219
|
-
* const boosters = await hypixel.getBoosters().catch(console.log);
|
|
220
|
-
* console.log(boosters[0].purchaser); // '978ddb705a8e43618e41749178c020b0'
|
|
221
|
-
*/
|
|
222
|
-
/**
|
|
223
|
-
* Allows you to get all skyblock profiles of player
|
|
224
|
-
* @method
|
|
225
|
-
* @name Client#getSkyblockProfiles
|
|
226
|
-
* @param {string} query Player nickname or UUID
|
|
227
|
-
* @param {SkyblockMethodOptions} [options={}] Method options
|
|
228
|
-
* @return {Promise<Array<SkyblockProfile>>}
|
|
229
|
-
* @example
|
|
230
|
-
* hypixel.getSkyblockProfiles('StavZDev').then(profiles => {
|
|
231
|
-
* console.log(profiles[0].members[0].uuid); // '52d9a36f66ce4cdf9a56ad9724ae9fb4'
|
|
232
|
-
* }).catch(e => {
|
|
233
|
-
* console.log(e);
|
|
234
|
-
* })
|
|
235
|
-
* @example
|
|
236
|
-
* const profiles = await hypixel.getSkyblockProfiles('StavZDev').catch(console.log);
|
|
237
|
-
* console.log(profiles[0].members[0].uuid); // '52d9a36f66ce4cdf9a56ad9724ae9fb4'
|
|
238
|
-
*/
|
|
239
|
-
/**
|
|
240
|
-
* Allows you to get a player's skyblock member data from all their profiles
|
|
241
|
-
* @method
|
|
242
|
-
* @name Client#getSkyblockMember
|
|
243
|
-
* @param {string} query Player nickname or UUID
|
|
244
|
-
* @param {SkyblockMethodOptions} [options={}] Method options
|
|
245
|
-
* @return {Promise<Map<string,SkyblockMember>>}
|
|
246
|
-
* @example
|
|
247
|
-
* hypixel.getSkyblockMember('StavZDev').then(member => {
|
|
248
|
-
* // 'Cucumber' - profile name
|
|
249
|
-
* console.log(member.get('Cucumber').uuid); // '52d9a36f66ce4cdf9a56ad9724ae9fb4'
|
|
250
|
-
* }).catch(e => {
|
|
251
|
-
* console.log(e);
|
|
252
|
-
* })
|
|
253
|
-
* @example
|
|
254
|
-
* const member = await hypixel.getSkyblockMember('StavZDev').catch(console.log);
|
|
255
|
-
* console.log(member.get('Cucumber').uuid); // '52d9a36f66ce4cdf9a56ad9724ae9fb4'
|
|
256
|
-
*/
|
|
257
|
-
/**
|
|
258
|
-
* Allows you to get a player's skyblock member data from all their profiles
|
|
259
|
-
* @method
|
|
260
|
-
* @name Client#getSkyblockGarden
|
|
261
|
-
* @param {string} profileId Profile id of the garden you want
|
|
262
|
-
* @param {MethodOptions} [options={}] Method options
|
|
263
|
-
* @return {Promise<SkyblockGarden>}
|
|
264
|
-
* @example
|
|
265
|
-
* hypixel.getSkyblockMember('StavZDev').then(member => {
|
|
266
|
-
* // 'Cucumber' - profile name
|
|
267
|
-
* console.log(member.get('Cucumber').uuid); // '52d9a36f66ce4cdf9a56ad9724ae9fb4'
|
|
268
|
-
* }).catch(e => {
|
|
269
|
-
* console.log(e);
|
|
270
|
-
* })
|
|
271
|
-
* @example
|
|
272
|
-
* const member = await hypixel.getSkyblockMember('StavZDev').catch(console.log);
|
|
273
|
-
* console.log(member.get('Cucumber').uuid); // '52d9a36f66ce4cdf9a56ad9724ae9fb4'
|
|
274
|
-
*/
|
|
275
|
-
/**
|
|
276
|
-
* Allows you to get a player's skyblock profile museum
|
|
277
|
-
* @method
|
|
278
|
-
* @name Client#getSkyblockMuseum
|
|
279
|
-
* @param {string} query Player nickname or UUID
|
|
280
|
-
* @param {string} profileId Profile ID
|
|
281
|
-
* @return {Promise<SkyblockMuseum>}
|
|
282
|
-
*/
|
|
283
|
-
/**
|
|
284
|
-
* Allows you to get the Hypixel API's Status and past Incidents, no key needed.
|
|
285
|
-
* @method
|
|
286
|
-
* @name Client#getAPIStatus
|
|
287
|
-
* @return {Promise<APIStatus>}
|
|
288
|
-
* @example
|
|
289
|
-
* hypixel.getAPIStatus().then(status => {
|
|
290
|
-
* console.log(status.incidents[0].link); // 'https://status.hypixel.net/incidents/zdd5gppdtcc3'
|
|
291
|
-
* }).catch(e => {
|
|
292
|
-
* console.log(e);
|
|
293
|
-
* })
|
|
294
|
-
*/
|
|
295
|
-
/**
|
|
296
|
-
* Gets all leaderboards
|
|
297
|
-
* @method
|
|
298
|
-
* @name Client#getLeaderboards
|
|
299
|
-
* @param {MethodOptions} [options={}] Method options
|
|
300
|
-
* @return {Promise<{ ARENA: Leaderboard[], COPS_AND_CRIMS: Leaderboard[], WARLORDS: Leaderboard[], BLITZ_SURVIVAL_GAMES: Leaderboard[], UHC: Leaderboard[], WALLS: Leaderboard[], PROTOTYPE: Leaderboard[], PAINTBALL: Leaderboard[], SKYWARS: Leaderboard[], MURDER_MYSTERY: Leaderboard[], SMASH_HEROES: Leaderboard[], DUELS: Leaderboard[], SPEED_UHC: Leaderboard[], TNTGAMES: Leaderboard[], BEDWARS: Leaderboard[], TURBO_KART_RACERS: Leaderboard[], BUILD_BATTLE: Leaderboard[], ARCADE: Leaderboard[], SKYCLASH: Leaderboard[], QUAKECRAFT: Leaderboard[], CRAZY_WALLS: Leaderboard[], MEGA_WALLS: Leaderboard[], VAMPIREZ: Leaderboard[] }>}
|
|
301
|
-
* @example
|
|
302
|
-
* hypixel.getLeaderboards().then(leaderboards => {
|
|
303
|
-
* console.log(leaderboards.ARENA[0].name); // 'Wins'
|
|
304
|
-
* }).catch(e => {
|
|
305
|
-
* console.log(e);
|
|
306
|
-
* })
|
|
307
|
-
*/
|
|
308
|
-
/**
|
|
309
|
-
* Sends a STATUS packet to hypixel and parses the return info (a 0x00 and 0x01 packet)
|
|
310
|
-
* @method
|
|
311
|
-
* @name Client#getServerInfo
|
|
312
|
-
* @param {number} [repeats=3] Sends x amount of ping requests and gets the average. Should be between 1 and 10
|
|
313
|
-
* @return {Promise<ServerInfo>}
|
|
314
|
-
* @example
|
|
315
|
-
* hypixel.getServerInfo(3).then(serverInfo =>{
|
|
316
|
-
* console.log(serverInfo.ping); // 69
|
|
317
|
-
* }).catch(console.log)
|
|
318
|
-
*/
|
|
319
|
-
/**
|
|
320
|
-
* Allows you to get recent games of a player
|
|
321
|
-
* @method
|
|
322
|
-
* @name Client#getRecentGames
|
|
323
|
-
* @param {string} query Player nickname or UUID
|
|
324
|
-
* @param {MethodOptions} [options={}] Method options
|
|
325
|
-
* @return {Promise<RecentGame[]>}
|
|
326
|
-
* @example
|
|
327
|
-
* hypixel.getRecentGames().then(recentGames =>{
|
|
328
|
-
* console.log(recentGames[0].endedTimestamp); // 1609670588789
|
|
329
|
-
* })
|
|
330
|
-
* .catch(console.log);
|
|
331
|
-
*/
|
|
332
|
-
/**
|
|
333
|
-
* Allows you to get the status of a player
|
|
334
|
-
* @method
|
|
335
|
-
* @name Client#getStatus
|
|
336
|
-
* @param {string} query Player nickname or UUID
|
|
337
|
-
* @param {MethodOptions} [options={}] Method options
|
|
338
|
-
* @return {Promise<Status>}
|
|
339
|
-
* @example
|
|
340
|
-
* hypixel.getStatus('Stavzdev').then(status =>{
|
|
341
|
-
* console.log(status.online); // true
|
|
342
|
-
* })
|
|
343
|
-
* .catch(console.log);
|
|
344
|
-
*/
|
|
345
|
-
/**
|
|
346
|
-
* Allows you to get skyblock auctions
|
|
347
|
-
* @method
|
|
348
|
-
* @name Client#getSkyblockAuctions
|
|
349
|
-
* @param {string|number|number[]} page - "*", a page number, or an array with the start and the end page number ( automatically sorted )
|
|
350
|
-
* @param {auctionsOptions} [options={}] Options
|
|
351
|
-
* @return {Promise<{info:AuctionInfo,Auctions:Auction[]}>}
|
|
352
|
-
*/
|
|
353
|
-
/**
|
|
354
|
-
* Allows you to get player's skyblock auctions
|
|
355
|
-
* @method
|
|
356
|
-
* @name Client#getSkyblockAuctionsByPlayer
|
|
357
|
-
* @param {string} query - player nickname or uuid
|
|
358
|
-
* @param {boolean} [includeItemBytes=false] - include item bytes (optional)
|
|
359
|
-
* @param {MethodOptions} [options={}] Options
|
|
360
|
-
* @return {Promise<Auction[]>}
|
|
361
|
-
* @example
|
|
362
|
-
* hypixel.getSkyblockAuctionsByPlayer('hypixel').then(auctions =>{
|
|
363
|
-
* console.log(auctions[0].auctionId); // b0491da3e81c43c88fd287ea3b3eacc0
|
|
364
|
-
* })
|
|
365
|
-
* .catch(console.log);
|
|
366
|
-
*/
|
|
367
|
-
/**
|
|
368
|
-
* Allows you to get all ended auctions in around the last 60 seconds
|
|
369
|
-
* @method
|
|
370
|
-
* @name Client#getEndedSkyblockAuctions
|
|
371
|
-
* @param {boolean} [includeItemBytes=false] - include item bytes (optional)
|
|
372
|
-
* @param {MethodOptions} [options={}] Options
|
|
373
|
-
* @return {Promise<{info:AuctionInfo,auctions:PartialAuction[]}>}
|
|
374
|
-
* @example
|
|
375
|
-
* hypixel.getEndedSkyblockAuctions().then(ended =>{
|
|
376
|
-
* console.log(ended.auctions[0].auctionId); // 0fe7fd132367474e86ff3022b4a84a13
|
|
377
|
-
* })
|
|
378
|
-
* .catch(console.log);
|
|
379
|
-
*/
|
|
380
|
-
/**
|
|
381
|
-
* Allows you to get list of products
|
|
382
|
-
* @method
|
|
383
|
-
* @name Client#getSkyblockBazaar
|
|
384
|
-
* @param {MethodOptions} [options={}] Options
|
|
385
|
-
* @return {Promise<Product[]>}
|
|
386
|
-
* @example
|
|
387
|
-
* hypixel.getSkyblockBazaar().then(products =>{
|
|
388
|
-
* console.log(products[0].productId); // INK_SACK:3
|
|
389
|
-
* })
|
|
390
|
-
* .catch(console.log);
|
|
391
|
-
*/
|
|
392
|
-
/**
|
|
393
|
-
* Allows you to get bingo data
|
|
394
|
-
* @method
|
|
395
|
-
* @name Client#getSkyblockBingo
|
|
396
|
-
* @param {MethodOptions} [options={}] Options
|
|
397
|
-
* @return {Promise<BingoData>}
|
|
398
|
-
*/
|
|
399
|
-
/**
|
|
400
|
-
* Allows you to get bingo data of a player
|
|
401
|
-
* @method
|
|
402
|
-
* @name Client#getSkyblockBingoByPlayer
|
|
403
|
-
* @param {string} query UUID / IGN of player
|
|
404
|
-
* @param {PlayerBingoOptions} [options={}] Options
|
|
405
|
-
* @return {Promise<PlayerBingo>}
|
|
406
|
-
*/
|
|
407
|
-
/**
|
|
408
|
-
* Allows you to get SB government
|
|
409
|
-
* @method
|
|
410
|
-
* @name Client#getSkyblockGovernment
|
|
411
|
-
* @param {MethodOptions} [options={}] Options
|
|
412
|
-
* @return {Promise<GovernmentData>}
|
|
413
|
-
*/
|
|
414
|
-
/**
|
|
415
|
-
* Allows you to get SB government
|
|
416
|
-
* @method
|
|
417
|
-
* @name Client#getSkyblockFireSale
|
|
418
|
-
* @param {MethodOptions} [options={}] Options
|
|
419
|
-
* @return {Promise<FireSale[]>}
|
|
420
|
-
*/
|
|
421
|
-
/**
|
|
422
|
-
* Get a array of active houses
|
|
423
|
-
* @method
|
|
424
|
-
* @name Client#getActiveHouses
|
|
425
|
-
* @param {MethodOptions} [options={}] Options
|
|
426
|
-
* @return {Promise<House[]>}
|
|
427
|
-
*/
|
|
428
|
-
/**
|
|
429
|
-
* Get a array of houses for a user
|
|
430
|
-
* @method
|
|
431
|
-
* @name Client#getPlayerHouses
|
|
432
|
-
* @param {string} query UUID / IGN of player
|
|
433
|
-
* @param {MethodOptions} [options={}] Options
|
|
434
|
-
* @return {Promise<House[]>}
|
|
435
|
-
*/
|
|
436
|
-
/**
|
|
437
|
-
* Get a house
|
|
438
|
-
* @method
|
|
439
|
-
* @name Client#getHouse
|
|
440
|
-
* @param {string} query House UUID
|
|
441
|
-
* @param {MethodOptions} [options={}] Options
|
|
442
|
-
* @return {Promise<House>}
|
|
443
|
-
*/
|
|
444
|
-
/**
|
|
445
|
-
* Allows you to get skyblock news
|
|
446
|
-
* @method
|
|
447
|
-
* @name Client#getSkyblockNews
|
|
448
|
-
* @param {MethodOptions} [options={}] Options
|
|
449
|
-
* @return {Promise<SkyblockNews[]>}
|
|
450
|
-
* @example
|
|
451
|
-
* hypixel.getSkyblockNews().then((news) => {
|
|
452
|
-
* console.log(news[0].link); // https://hypixel.net/threads/3749492/
|
|
453
|
-
* })
|
|
454
|
-
* .catch(console.log)
|
|
455
|
-
*/
|
|
456
|
-
/**
|
|
457
|
-
* Allows you to get player count along with the player count of each public game
|
|
458
|
-
* @method
|
|
459
|
-
* @name Client#getGameCounts
|
|
460
|
-
* @param {MethodOptions} [options={}] Options
|
|
461
|
-
* @return {Promise<GameCounts>}
|
|
462
|
-
* @example
|
|
463
|
-
* hypixel.getGameCounts().then((gameCounts) => {
|
|
464
|
-
* console.log(gameCounts.mainLobby.players);
|
|
465
|
-
* })
|
|
466
|
-
* .catch(console.log)
|
|
467
|
-
*/
|
|
468
|
-
/**
|
|
469
|
-
* Delete x (by default all) cache entries
|
|
470
|
-
* @param {?number} amount Amount of cache to delete
|
|
471
|
-
* @return {Promise<void|boolean[]>}
|
|
472
|
-
*/
|
|
473
|
-
sweepCache(amount) {
|
|
474
|
-
return this.requests.sweepCache(amount);
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* @typedef {object} ClientOptions
|
|
479
|
-
* @prop {boolean} [cache=true] Enable/Disable request caching.
|
|
480
|
-
* @prop {number} [hypixelCacheTime=60] Amount of time in seconds to cache the hypixel api requests.
|
|
481
|
-
* @prop {number} [mojangCacheTime=600] Amount of time in seconds to cache the mojang api requests.
|
|
482
|
-
* @prop {CacheHandler} [cacheHandler] Custom Cache Handler
|
|
483
|
-
* @prop {'AUTO'|'HARD'|'NONE'} [rateLimit='AUTO'] Rate limit mode.
|
|
484
|
-
* @prop {boolean} [syncWithHeaders=false] Sync with headers rate limit information. Usually not necessary nor recommended ( because of latency )
|
|
485
|
-
* @prop {number} [keyLimit=60] Key limit of your key.
|
|
486
|
-
* @prop {number} [cacheSize=-1] The amount how many results will be cached. (`-1` for infinity)
|
|
487
|
-
* @prop {boolean} [silent=false] Don't automatically put warnings into console.
|
|
488
|
-
* @prop {object} [headers={}] Extra Headers ( like User-Agent ) to add to request.
|
|
489
|
-
* @prop {boolean} [checkForUpdates=true] Enable/Disable check for new version of hypixel-api-reborn.
|
|
490
|
-
* @prop {boolean|string} [useThirdPartyAPI=false] Enable/Disable Mojang Third Party API
|
|
491
|
-
*/
|
|
492
|
-
// eslint-disable-next-line no-unused-vars
|
|
493
|
-
const defaultCache = require('./Private/defaultCache.js');
|
|
494
|
-
/**
|
|
495
|
-
* @typedef {defaultCache} Cache
|
|
496
|
-
*/
|
|
497
|
-
/**
|
|
498
|
-
* @typedef {Cache} CacheHandler
|
|
499
|
-
*/
|
|
500
|
-
/**
|
|
501
|
-
* @typedef {object} MethodOptions
|
|
502
|
-
* @property {boolean} [raw=false] Raw data
|
|
503
|
-
* @property {boolean} [noCacheCheck=false] Disable/Enable cache checking
|
|
504
|
-
* @property {boolean} [noCaching=false] Disable/Enable writing to cache
|
|
505
|
-
* @prop {object} [headers={}] Extra Headers ( like User-Agent ) to add to request. Overrides the headers globally provided.
|
|
506
|
-
*/
|
|
507
|
-
/**
|
|
508
|
-
* @typedef {object} PlayerMethodOptions
|
|
509
|
-
* @property {boolean} [raw=false] Raw data
|
|
510
|
-
* @property {boolean} [noCacheCheck=false] Disable/Enable cache checking
|
|
511
|
-
* @property {boolean} [noCaching=false] Disable/Enable writing to cache
|
|
512
|
-
* @property {boolean} [guild=false] Disable/Enable request for player's guild
|
|
513
|
-
* @property {boolean} [recentGames=false] Disable/Enable request for player's recent game
|
|
514
|
-
* @prop {object} [headers={}] Extra Headers ( like User-Agent ) to add to request. Overrides the headers globally provided.
|
|
515
|
-
*/
|
|
516
|
-
/**
|
|
517
|
-
* @typedef {object} SkyblockMethodOptions
|
|
518
|
-
* @property {boolean} [raw=false] Raw data
|
|
519
|
-
* @property {boolean} [noCacheCheck=false] Disable/Enable cache checking
|
|
520
|
-
* @property {boolean} [noCaching=false] Disable/Enable writing to cache
|
|
521
|
-
* @property {?boolean} [fetchPlayer=false] Disable/Enable player profile request for each member
|
|
522
|
-
* @property {?boolean} [getMuseum=false] Disable/Enable player museum request for each member
|
|
523
|
-
* @property {?boolean} [getGarden=false] Disable/Enable player garden request for each member
|
|
524
|
-
* @prop {object} [headers={}] Extra Headers ( like User-Agent ) to add to request. Overrides the headers globally provided.
|
|
525
|
-
*/
|
|
526
|
-
/**
|
|
527
|
-
* @typedef {object} auctionsOptions
|
|
528
|
-
* @property {boolean} [noCacheCheck=false] Disable/Enable cache checking
|
|
529
|
-
* @property {boolean} [noCaching=false] Disable/Enable writing to cache
|
|
530
|
-
* @property {boolean} [noInfo=false] If true, result doesn't show Auction Info
|
|
531
|
-
* @property {boolean} [noAuctions=false] If true, result doesn't show auctions
|
|
532
|
-
* @property {boolean} [raw=false] If true, result will not contain parsed auctions, but will present them as it is received. This can speed up performance in some cases.
|
|
533
|
-
* @property {number} [retries=3] Number of times to retry fetching a page before abandoning
|
|
534
|
-
* @property {number} [cooldown=100] Cooldown between each fetch, only works if race is unset or false;
|
|
535
|
-
* @property {boolean} [race=false] Issues simultaneous requests to the API, instead of requesting then parsing one by one. Can largely increase speed at the cost of hogging bandwidth and memory
|
|
536
|
-
* @property {boolean} [includeItemBytes=false] Whether to include item bytes in the result
|
|
537
|
-
* @prop {object} [headers={}] Extra Headers ( like User-Agent ) to add to request. Overrides the headers globally provided.
|
|
538
|
-
*/
|
|
539
|
-
/**
|
|
540
|
-
* @typedef {object} PlayerBingoOptions
|
|
541
|
-
* @property {boolean} [raw=false] Raw data
|
|
542
|
-
* @property {boolean} [noCacheCheck=false] Disable/Enable cache checking
|
|
543
|
-
* @property {boolean} [noCaching=false] Disable/Enable writing to cache
|
|
544
|
-
* @property {boolean} [fetchBingoData=false] Fetches bingo data to give more information
|
|
545
|
-
* @prop {object} [headers={}] Extra Headers ( like User-Agent ) to add to request. Overrides the headers globally provided.
|
|
546
|
-
*/
|
|
547
|
-
module.exports = Client;
|