UNPKG

nobloxmmc.js

Version:

A Node.js wrapper for ROBLOX. (original from sentanos)

22 lines (18 loc) 462 B
const http = require('../util/http.js').func exports.required = ['userId'] exports.func = (args) => { const userId = args.userId return http({ url: '//avatar.roblox.com/v1/users/' + userId + '/currently-wearing', options: { method: 'GET', resolveWithFullResponse: true } }).then((res) => { if (res.statusCode === 200) { return JSON.parse(res.body) } else { throw new Error('User does not exist') } }) }