How to set up the Osirus Bot through NPM

October 31, 20231 min

Osirus is a versatile bot that can be seamlessly integrated into your web projects. Whether you're building a website or app, you can enhance the user experience with this bot. In this blog post, we'll walk you through the steps to set up the Osirus bot via NPM, allowing you to manage your bot directly within your project.

Installation

To easily install Osirus using NPM, follow these steps:

  1. Open your terminal.
  2. Navigate to your project's root folder.
  3. Execute the following command:
npm i @osirus/bot

After successfully installing the package, you can initialize your Osirus bot by adding the following code to your JavaScript file:

import OsirusBot from '@osirus/bot';

OsirusBot.init(options)

 

Configure your widget

Before finalizing the installation, make sure to configure your bot according to your specific needs. You can define various options, such as the bot's name, company name, logo, colors, description, and more. This customization allows you to tailor the bot to match your branding and user experience requirements.

You have two options for initializing the bot:

  1. Create a bot on the platform: This method is highly recommended because it allows you to make real-time updates to your widget without requiring any changes to your code.
  2. Configure your bot with a JavaScript object: You can provide all the necessary settings directly from your code.