Highrise JavaScript Package

Introducing highrise-js-sdk: Your Ultimate Bot Development Tool

:rocket: Unleash the Power of highrise-js-sdk

highrise-js-sdk is a revolutionary Node.js module specifically designed to enhance your bot development experience on the Highrise platform. By leveraging the power of this SDK, you can effortlessly interact with the robust Highrise WebAPI 23.1.0 and build advanced bots with ease.

:thinking: Why highrise-js-sdk?

Discover the unparalleled advantages of using highrise-js-sdk for your bot development:

  1. Simplicity and Intuitiveness: highrise-js-sdk offers an intuitive and user-friendly interface, ensuring a smooth development process.

  2. Beginner-Friendly: Even if youโ€™re new to programming or working with APIs, highrise-js-sdk provides a gentle learning curve, making it accessible to developers of all levels.

  3. Automatic Reconnection: Say goodbye to connection interruptions! This SDK automatically handles reconnections in case of disruptions, ensuring uninterrupted bot functionality.

  4. Wide Node Version Support: highrise-js-sdk supports Node version 10 and above, allowing you to leverage the latest features of Node.js in your bot development.

  5. Flexible and Feature-Rich: With highrise-js-sdk, you gain access to an extensive range of features, including a caching system, awaitMessages functionality, and games, enabling you to create dynamic and engaging bots.

:gear: Getting Started

To get started with highrise-js-sdk, follow these simple steps:

  1. Install the package by navigating to your bot folder and running the command npm install highrise-js-sdk@latest after initializing your project with npm init -y.
  2. Import the necessary classes and set up your bot using the following code snippet:

:inbox_tray: Class Import

// Import Highrise class
const { Highrise } = require("highrise-js-sdk");

// Configuration settings
const settings = {
  token: 'CHANGE-ME', // Your bot token
  room: 'CHANGE-ME', // Room ID
  events: ['ready', 'playerJoin', 'playerLeave', 'messages'], // Events to listen for
  reconnect: 5 // Optional: Number of reconnection attempts
};

// Create a new instance of the Highrise SDK
const bot = new Highrise({ events: settings.events }, settings.reconnect);

// Event: Bot is ready
bot.once('ready', async (session) => {
  console.log(`Bot is now online in ${session.room_info.room_name}.`);
  console.log(`Bot ID: ${session.user_id}`);
  console.log(`Owner ID: ${session.room_info.owner_id}`);
  console.log(`Rate Limits: ${session.rate_limits.client}`);
  console.log(`Connection ID: ${session.connection_id}`);
  console.log(`SDK Version: ${session.sdk_version}`);
});

// Event: New chat message created
bot.on('chatMessageCreate', (user, message) => {
  console.log(`[${user.username}](${user.id}): ${message}`);
});

// Event: Error occurred
bot.on('error', (error) => {
  console.error('Error occurred:', error);
  bot.reconnect();
});

// Login and start the bot
bot.login(settings.token, settings.room);

:blue_book: Documentation and Changelogs

Refer to the comprehensive Highrise JS SDK Documentation for detailed information on the package, including usage guidelines and methods.

For package changelogs, you can find them on the Highrise Discord or visit this link to access the changelogs on the official website.

:spiral_notepad: Note

Please note that highrise-js-sdk is an independently developed package by iHsein (Sphinix) and is currently in beta. However, it has been meticulously crafted to deliver exceptional bot development capabilities on the Highrise platform.

Get ready to unlock the true potential of your bots with highrise-js-sdk and embark on an extraordinary journey of innovation and creativity!

11 Likes

@iiHsein, Thanks for all your work on this SDK package! Itโ€™s easy to use and understand, and Iโ€™ve converted all my python projects to Javascript since this has been released :grinning:

3 Likes

Thank you for your feedback. Iโ€™m glad to hear that you are enjoying the package. Version 2.1.0 will be released soon, and Iโ€™m excited to introduce new methods and ensure the package remains up to date. If you have any suggestions, please feel free to share them with me.

2 Likes

Would you be able to help me get mine running? I have kind of figured it out, but am struggling a bit

1 Like

Hello, you can seek help on the Highrise Discord server. Iโ€™ll be there to assist you with whatever you need.