Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.81 KB

README.md

File metadata and controls

46 lines (31 loc) · 1.81 KB

Hiven.js

Follow on twitter Follow Hiven.js on twitter NPM Package Version NPM Bundle MIN Size GitHub License GitHub Code Size GitHub Repo Size

Client library for Hiven, used to make chat bots and interact with the API.

This is currently a work in-progress.

This was originally created to be similar to discord.js and will probably still inherit some of it's features in the future.

Install instructions

Installation via NPM

npm install hiven

Installation via Yarn

yarn install hiven


IMPORTANT: In order to use this library with a user account you need to instantiate your client with these settings.

const { Client } = require('hiven');
const client = new Client({ type: 'user' });

client.on('init', () => {
  console.log("Connected to Hiven Swarm!")
});

client.on('message', (msg) => {
  console.log(`Received message: ${msg.content} from ${msg.author.username}`)
});

client.connect("your token")