UNPKG

@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

41 lines (40 loc) 1.33 kB
import { Paths } from "../types/api"; import { Method } from "../util/Method"; import { ResultObject } from "../util/ResultObject"; import type { GuildResponse } from "../types/AugmentedTypes"; /** * @example * ```typescript * const guild = await client.guild.id("553490650cf26f12ae5bac8f"); * ``` * @category Client */ export declare class Guild extends Method { /** * Returns the guild by the requested ID if found. * @example * ```typescript * const guild = await client.guild.id("553490650cf26f12ae5bac8f"); * ``` * @category API */ id(id: Paths.V2Guild.Get.Parameters.Id): Promise<ResultObject<GuildResponse, ["guild"]>>; /** * Returns the guild by the requested player's UUID if found. * @example * ```typescript * const guild = await client.guild.player("20934ef9488c465180a78f861586b4cf"); * ``` * @category API */ player(player: Paths.V2Guild.Get.Parameters.Player): Promise<ResultObject<GuildResponse, ["guild"]>>; /** * Returns the guild by the requested guild name if found. * @example * ```typescript * const guild = await client.guild.name("Mini Squid"); * ``` * @category API */ name(name: Paths.V2Guild.Get.Parameters.Name): Promise<ResultObject<GuildResponse, ["guild"]>>; }