workonflow-bot-client

$ npm install workonflow-bot-client

Usage no npm install needed!

<script type="module">
  import workonflowBotClient from 'https://cdn.skypack.dev/workonflow-bot-client';
</script>

README

workonflow-bot-client

Установка

$ npm install workonflow-bot-client

const botConnect = require('workonflow-bot-client').connect

const creds = {
  email: "you email",
  password: "you password"
}
(async () {
  const botClient = await botConnect(creds)
})()

Как использовать

const botClient = await botConnect(creds)

const { comment } = botClient

comment.onDirect(async message => {
  console.log('ON_DIRECT', message)
  const { teamId } = message
  const to = message.data.content.from

  const att = "text for response"
  const resp = await comment.create(teamId, { to, att })
  console.log('resp', resp)
})

Документация