Guild Level

Helpers
  • Helper
  • Guild
  • Level

# Guild Level

# Introduction

The getGuildLevel() helper calculates the level of a guild from either a Guild object or a guild exp value.

# Example

import { Client as Hypixel, getGuildLevel } from "@zikeji/hypixel";
const client = new Hypixel("API_KEY");
(async () => {
  const guild = await client.guild.name("Mini Squid");
  const info = getGuildLevel(guild);
  console.log(info);
  // output:
  {
    level: 99,
    preciseLevel: 99.88182633333334,
    currentExp: 277645479,
    expToLevel: 275000000,
    expToNextLevel: 3000000,
    remainingExpToNextLevel: 354521
  }
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Last update: September 17, 2024 03:06