1.0.3 • Published 1 year ago

pixelic-emojis v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Links

Discord Support | NPM | GitHub

Install

npm i pixelic-emojis
const pixelicEmojis = require("pixelic-emojis");

Docs

.rankEmoji() Constructor

const rankEmoji = pixelicEmojis.parseRankEmoji(rank, plusColor, plusPlusColor);

Options:

OptionTypeDescription
rankObject, String or nullSet the player's rank if you already got the rank parsed, passing null will get interpreted as the "DEFAULT" rank. If you are using raw Hypixel Data and rank still needs to be parsed then use a rank object an example is shown below.
plusColorString or nullSet the plusColor of the player, passing null will get interpreted as the default color "RED".
plusPlusColorString or nullSet the plusPlusColor of the player, passing null will get interpreted as the default color "GOLD".

.rankEmoji() Examples:

Using raw Hypixel data:

const pixelicEmojis = require("pixelic-emojis");
const fetch = (...args) => import("node-fetch").then(({ default: fetch }) => fetch(...args));

const res = await fetch("https://api.hypixel.net/player?uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
const parsedRes = (await res.json()).player;

const rankEmoji = pixelicEmojis.parseRankEmoji(
  {
    rank: parsedRes.rank,
    packageRank: parsedRes.packageRank,
    newPackageRank: parsedRes.newPackageRank,
    monthlyPackageRank: parsedRes.monthlyPackageRank,
    prefix: parsedRes.prefix,
  },
  parsedRes.rankPlusColor,
  parsedRes.monthlyRankColor
);

console.log(rankEmoji);

Using already parsed data:

const pixelicEmojis = require("pixelic-emojis");

const rankEmoji = pixelicEmojis.parseRankEmoji("MVP++", "LIGHT_PURPLE", null);

console.log(rankEmoji);
1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago