The ready event is triggered each time the bot connects to the API using WebSocket. It's not meant for setting intervals to run in the background. Instead, we suggest running functions in the main file, not the event. You can use this event to fetch info or perform actions at startup, such as moving the bot to a specific position.

⚙️ Use cases

bot.on('ready', (session) => {
  // Log that the bot is ready.
  console.log("[READY] Bot is ready!".green + ` Session: ${session}`);

  // Walk to the front left of the room.
  bot.move.walk(1, 0, 1, "FrontRight");
});

Go Back: Get Methods