@zikeji/hypixel
Version:
With IntelliSense support & test coverage, this is an unopinionated async/await API wrapper for Hypixel's Public API. It is developed in TypeScript complete with documentation, typed interfaces for all API responses, built-in rate-limit handling, flexible
27 lines (26 loc) • 906 B
TypeScript
/**
* This portion of code was ported from the [hypixel-php](https://github.com/Plancke/hypixel-php) library.
*
* Copyright (c) 2020 Zikeji
* Copyright (c) 2017 Aäron Plancke
*
* For the original full copyright and license information, please view the LICENSE-HYPIXEL-PHP.md that was distributed with this source code.
*/
import type { GuildResponse } from "../types/AugmentedTypes";
/**
* Describes the results of the {@link getGuildLevel} output object.
*/
export interface GuildLevel {
level: number;
preciseLevel: number;
currentExp: number;
expToLevel: number;
expToNextLevel: number;
remainingExpToNextLevel: number;
}
/**
* Calculates the guild level and returns a {@link GuildLevel} interface.
* @param data The guild object or the raw EXP number.
* @category Helper
*/
export declare function getGuildLevel(data: GuildResponse["guild"] | number): GuildLevel;