# telegraf-logs-answer

> this library is a middleware that allows you to write a user action logger in a few lines of code and the ability to respond to users on behalf of a bot

Latest version **1.1.0** (published 2022-02-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install telegraf-logs-answer
pnpm add telegraf-logs-answer
yarn add telegraf-logs-answer
bun add telegraf-logs-answer
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-02-21 |
| First published | 2022-01-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Giranda22-Git |
| Maintainers | giranda22 |
| Keywords | telegram bot logs, telegram logs, telegraf logs, telegraf operator, telegraf bot logs and answers, telegraf logger |

## Links

- npm: https://www.npmjs.com/package/telegraf-logs-answer
- Repository: https://github.com/Giranda22-Git/telegraf-logs-answer
- Homepage: https://github.com/Giranda22-Git/telegraf-logs-answer#readme
- Issues: https://github.com/Giranda22-Git/telegraf-logs-answer/issues
- npm.io page: https://npm.io/package/telegraf-logs-answer

## Dependencies (1)

- [telegraf](https://npm.io/package/telegraf.md) ^4.6.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2022-02-21
- 1.0.1 — 2022-01-26
- 1.0.0 — 2022-01-26

## README

# telegraf-logs-answer

This library is a middleware that allows you to write a user action logger in a few lines of code and the ability to respond to users on behalf of a bot.

_only works in conjunction with telegraf.js_
_only works in nodejs v14 and above_

### Installation
To install locally in a project, use
```
$ npm install telegraf-logs-answer --save
```
### Usage

```
const telegrafLA = require('telegraf-logs-answer')
const { Telegraf } = require('telegraf')

const mainBot = new Telegraf(/* main telegram bot token */)
const loggerBot = new Telegraf(/* logger telegram bot token */)

mainBot.use(telegrafLA({
  loggerBot, // another your bot, the one who will send logs from the main bot
  answerBot: mainBot, // your main bot, who will reply to the user
  outputTelegramId: '' // telegram id of group or user for send logs
}))

mainBot.launch()
```

### Result
As a result, you will have your main bot, and a logger bot that sends you logs, in order to answer a person on behalf of the bot, you need to write a message in response to the message of the logger bot

---
_Source: https://npm.io/package/telegraf-logs-answer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
