npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

highrise.sdk

v1.1.7

Published

A JavaScript library for writing and running Highrise bots.

Downloads

81

Readme

highrise.sdk

The Highrise SDK is a JavaScript library for writing and running Highrise bots.

⚙️ Installation

npm i highrise.sdk@latest

✨ Features

  • Easy to use.
  • Beginner friendly.
  • Auto reconnect system.
  • Supports Node version 10+
  • Supports Highrise WebAPI

📥 Class Import

  1. Import the necessary classes and modules from the SDK:
const { Highrise, GatewayIntentBits, WebApi } = require('highrise.sdk');
  1. Set up the bot's settings by providing a bot token and room ID:
const settings = {
  token: 'CHANGE-ME', // Replace with your bot token
  room: 'CHANGE-ME', // Replace with the room ID your bot will join
  reconnect: 5 // Reconnect duration in seconds
};
  1. Create an instance of the Highrise bot, specifying the desired intents and cache option:
const bot = new Highrise({
  intents: [
    GatewayIntentBits.Ready,
    GatewayIntentBits.Messages,
    GatewayIntentBits.Joins,
    GatewayIntentBits.Leaves,
    GatewayIntentBits.Error
  ],
  cache: true
}, settings.reconnect);
  1. Logging in the bot:
bot.login(settings.token, settings.room);

🎋 GatewayIntentBits

GatewayIntentBits represents the different intents or event types that your bot can listen for. By specifying these intents when creating the bot, you can control which events your bot will receive. The available intents include:

  • GatewayIntentBits.Ready: Indicates when the bot is ready to start interacting.
  • GatewayIntentBits.Messages: Represents chat messages sent in the Highrise room.
  • GatewayIntentBits.DirectMessages: Represents direct messages sent to the bot.
  • GatewayIntentBits.Joins: Indicates when users join the room.
  • GatewayIntentBits.Leaves: Indicates when users leave the room.
  • GatewayIntentBits.Reactions: Represents reactions added to players.
  • GatewayIntentBits.Emotes: Represents emotes added to players.
  • GatewayIntentBits.Tips: Represents tip reactions received.
  • GatewayIntentBits.VoiceChat: Represents voice chat events.
  • GatewayIntentBits.Movements: Indicates when users move within the room.
  • GatewayIntentBits.Error: Represents errors that occur during API operations.
  • GatewayIntentBits.Moderate: Indicates when moderators perform moderation actions on players.

You can choose the intents based on the events you want your bot to handle.

📦 Cache Option

The cache option, when set to true, enables caching of certain data to optimize performance and reduce API calls. By enabling the cache and using the appropriate intents, you can utilize methods that rely on cached data rather than making API requests.

📖 Examples

  • Listening for the ready event:
bot.on('ready', (session) => {
  // Handle bot ready event
});
  • Listening for chat messages:
bot.on('chatCreate', async (user, message) => {
  // Handle chat message event
});
  • Listening for errors:
bot.on('error', (message) => {
  // Handle error event
});

📘 Documentation

Refer to the SDK documentation for more information on available events and methods. Highrise JS SDK Documentation

🤝 Contributions

Contributions to the Highrise SDK are welcome! If you find any issues or want to add new features, feel free to submit a pull request.

Note

This package is not an official Highrise package, it's self-made by iHsein (sphinix) and is still in beta.