This event logs player objects when they leave the room, capturing their username and user ID, along with their position.
const { Highrise, Events } = require("highrise.sdk");
// Create a new instance of the Highrise class.
const bot = new Highrise({
Events: [
Events.Leaves, // Listen for player leave.
]
});
bot.on('playerLeave', (user) => {
console.log(`[PLAYER LEFT]: ${user.username}:${user.id}`)
// Send a goodbye message to the user.
bot.message.send(`Goodbye, ${user.username}!`);
});
Go Back: Get Methods