This event logs player objects when they leave the room, capturing their username and user ID, along with their position.

Enabling The Event

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.
  ]
});

⚙️ Use cases

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