Introducing highrise-js-sdk: Your Ultimate Bot Development Tool
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.
Why highrise-js-sdk?
Discover the unparalleled advantages of using highrise-js-sdk for your bot development:
-
Simplicity and Intuitiveness: highrise-js-sdk offers an intuitive and user-friendly interface, ensuring a smooth development process.
-
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.
-
Automatic Reconnection: Say goodbye to connection interruptions! This SDK automatically handles reconnections in case of disruptions, ensuring uninterrupted bot functionality.
-
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.
-
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.
Getting Started
To get started with highrise-js-sdk, follow these simple steps:
- Install the package by navigating to your bot folder and running the command
npm install highrise-js-sdk@latest
after initializing your project withnpm init -y
. - Import the necessary classes and set up your bot using the following code snippet:
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);
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.
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!