node-labymod

A wrapper for the LabyMod-API. Fetch Emotes, Stickers and more!

Usage no npm install needed!

<script type="module">
  import nodeLabymod from 'https://cdn.skypack.dev/node-labymod';
</script>

README

node-labymod

Discord server NPM version PayPal

npm installnfo

Table of contents

About

node-labymod is a Node.js module that allows you to easily fetch LabyMod information about a minecraft user, get the daily shop, status of LabyMod and more!

  • Based on Promises
  • Light-Weight

Installation

Node.js 14.0.0 or newer is required.

To install the module run npm install node-labymod.

Documentation

  • getAddons():
    • Returns: A list of available LabyMod addons and their details.
  • getCapeData(username):
    • Parameter: String (A minecraft username)
    • Returns: Information about a LabyMod users' cape
  • getCosmetics(uuid):
    • Parameter: String (UUID in format of 36 characters)
    • Returns: A list of owned cosmetics by a user
  • getEmotes(uuid):
    • Parameter: String (UUID in format of 36 characters)
    • Returns: A list of owned emotes by a user
  • getRoles(uuid):
    • Parameter: String (UUID in format of 36 characters)
    • Returns: A list of roles a user has
  • getStickers(uuid):
    • Parameter: String (UUID in format of 36 characters)
    • Returns: A list of owned stickers a user has
  • getShop(type):
    • Parameter: String (raw, all, rare)
    • Returns: The daily emotes
  • getStatus():
    • Returns: The status of LabyMod services
  • getUser(uuid):
    • Returns: All stats of a LabyMod user
  • getVersions():
    • Returns: A list of available LabyMod versions
  • reportCape(owner, reporter):
    • Reports: A users' cape
  • getPublicServers():
    • Reports: Returns a list of public servers

Examples

const LabyMod = require('node-labymod');

// Using Promises
LabyMod.getStatus().then(console.log); // Prints "OK" if everything is fine
LabyMod.getUser('70d39c44-adbd-442f-a0a3-f29fcb895699').then(console.log);
LabyMod.reportCape('DomeMilch', 'TiimDE')
        .then(() => console.log('Success!'))
        .catch(console.error);

// Or using ASYNC/AWAIT syntax
(async () => {
    console.log(await LabyMod.getStatus());
    console.log(await LabyMod.getUser('70d39c44-adbd-442f-a0a3-f29fcb895699'));

    try {
        await LabyMod.reportCape('DomeMilch', 'TiimDE');
    } catch (err) {
        console.error(err);
    }
})();

Contributing

Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the documentation.