@kiina/bot-middlewares

1.0.0 • Public • Published

Bot middlewares

This package contains the base bot middlewares for building the bots.

Installation

npm install @kiina/bot-middlewares

Table of contents

  1. AnswerMiddleware

AnswerMiddleware(logger?: Logger)

Picks up the given answer in the update object and sends to the recipient.

Usage

const { AnswerMiddleware } = require('@kiina/bot-middlewares');

interface Logger {
  info(...args): void;
  error(...args): void;
}

const logger: Logger = /* ... */;

bot.addMiddleware(new AnswerMiddleware(logger));

Readme

Keywords

none

Package Sidebar

Install

npm i @kiina/bot-middlewares

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

6.04 kB

Total Files

7

Last publish

Collaborators

  • asalgado
  • eder_kiina
  • antunesmg
  • marcojardim