Use Lanyard in your Web App. Phineas - Creator of Lanyard API
- Call to your page (
https://cdn.jsdelivr.net/gh/0x5841524f4e/js-lanyard/lanyard.js
)
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
Distributed under the GPL-3.0 License. See LICENSE
for more information.