Example Application

In this example, we'll make a node.js application that fetches a user's username and display name from their ID and logs it to the console.

import * as roflare from 'roflare'

const uid = 1
const userData = {
    username: await roflare.GetUsername(uid),
    displayName: await roflare.GetDisplayName(uid)
}

console.log(userData)

Output:

{
    username: 'ROBLOX',
    displayName: 'ROBLOX'
}

Last updated

Was this helpful?