Home

Awesome

JS-Lanyard

Use Lanyard in your Web App. Phineas - Creator of Lanyard API

CDN

Usage

Using without websocket:

 // rest with single user example
lanyard({
    userId: "213325478096797697",
}).then(console.log) // presenceData

// rest with multiple  users example
lanyard({
    userId: ["213325478096797697", "331846231514939392"],
}).then(console.log) // presenceData[]

Using with websocket:

// websocket with single user example
lanyard({
    userId: "213325478096797697",
    socket: true,
    onPresenceUpdate: console.log // presenceData
}) // returns a websocket

// websocket with multiple users example
lanyard({
    userId: ["213325478096797697", "331846231514939392"],
    socket: true,
    onPresenceUpdate: console.log // presenceData[]
}) // returns a websocket

License

Distributed under the GPL-3.0 License. See LICENSE for more information.