This event logs incoming messages in the bot's whisper, providing user details like username and player ID, along with the message sent. It's the foundation for receiving messages and creating commands based on them.

Enabling The Event

const { Highrise, Events } = require("highrise.sdk");

// Create a new instance of the Highrise class.
const bot = new Highrise({
  Events: [
    Events.Messages // Listen for chat messages.
  ]
});

⚙️ Use cases

bot.on("whisperCreate", (user, message) => {
  // Log the whisper message to the console.
  console.log(`[WHISPER]: ${user.username}:${user.id} - ${message}`)

  // If the message is "dance", then dance.
  if (message === "dance") {
    bot.player.emote(user.id, "idle-dance-casual");
  }
});

Go Back: Get Methods