Skip to content

vitalyavolyn/aitu

Repository files navigation

aitu npm GitHub Workflow Status Aitu chat

A module for Aitu.io's service API, heavily inspired by negezor/vk-io and nitreojs/puregram.

Documentation (RU)

Installation

Yarn

Recommended

yarn add aitu

NPM

npm i aitu

Example usage

const { Aitu } = require('aitu')

const aitu = new Aitu({
  // Token received from @MasterService
  token: ''
})

aitu.updates.on('Message', async context => {
  const { name } = await aitu.api.getMe()

  context.send(`Hello! My name is ${name}`)
})

aitu.updates.startPolling()

More examples