minecraft-userdata
v1.0.4
Published
Simple mojang api npm package
Downloads
449
Maintainers
Readme
Simple Minecraft-UserData
Introduction
A Simple Mojang api based minecraft module
Installation
npm install minecraft-userdata
Basic javascript example
const mc = require("minecraft-userdata")
mc.GetData("<username>").then(user => console.log(user.id))
Discord.js example
const Discord = require('discord.js');
const mc = require("minecraft-userdata")
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', async message => {
if (message.content === 'uuid') {
let userid = mc.getUUID("Dream")
message.channel.sent(`${userid}`);
}
});
client.login('token');