You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mee6-levels-api

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mee6-levels-api

An unofficial wrapper around the Mee6 levels API to fetch the leaderboard, role rewards and user xp data.

1.3.1
latest
Source
npmnpm
Version published
Weekly downloads
32
3.23%
Maintainers
1
Weekly downloads
 
Created
Source

mee6-levels-api

An unofficial API wrapper for the Mee6 levels plugin.

Note

While this package works (at the time of writing this), it is neither developed nor officially supported by the Mee6 team. The API route used here is undocumented and is subject to change at any point of time.

Please do not ask for support for this package at the Mee6 Support server. Instead, you may message me directly at rjt#2336 or open an issue here for any concerns related to this package.

Installation

Install from npm as follows:

npm install mee6-levels-api

Usage

const Mee6LevelsApi = require("mee6-levels-api");

const guildId = "159962941502783488"; // or a Guild object with the id property
const userId = "258258856189231104"; // or a User object with the id property

Mee6LevelsApi.getLeaderboardPage(guildId).then(leaderboard => {
	// do something with leaderboard
	console.log(`${leaderboard.length} members ranked on the leaderboard.`);
});

Mee6LevelsApi.getRoleRewards(guildId).then(rewards => {
	// do something with rewards
	for (const reward of rewards)
		console.log(`${reward.role.name} - Given at level ${reward.level}`);
});

Mee6LevelsApi.getUserXp(guildId, userId).then(user => {
	// do something with user info
	console.log(`${user.tag} is at level ${user.level} and rank ${user.rank}.`);
});

Configuration

Open the leaderboard settings in the MEE6 dashboard and enable the option: Make my server's leaderboard public. It is not possible to fetch data from the dashboard if this option is not enabled and the error 'Response code 401' will be returned.

Keywords

nodejs

FAQs

Package last updated on 08 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts