# rubik-telegram

> Telegram Bot Api kubik for the Rubik application system

Latest version **1.2.8** (published 2024-07-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install rubik-telegram
pnpm add rubik-telegram
yarn add rubik-telegram
bun add rubik-telegram
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.8 |
| Published | 2024-07-03 |
| First published | 2019-09-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 21 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Constantin T. |
| Maintainers | ya-kostik, nikitandr |
| Keywords | rubik, kubik, telegram, bots |

## Links

- npm: https://www.npmjs.com/package/rubik-telegram
- Repository: https://github.com/ya-kostik/rubik-telegram
- npm.io page: https://npm.io/package/rubik-telegram

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [form-data](https://npm.io/package/form-data.md) ^4.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1

## Recent versions

- 1.2.8 (latest) — 2024-07-03
- 1.2.7 — 2023-12-29
- 1.2.5 — 2022-07-22
- 1.2.4 — 2022-07-22
- 1.2.3 — 2021-12-16
- 1.2.2 — 2021-06-30
- 1.0.8 — 2021-06-30
- 1.2.0 — 2021-06-02
- 1.1.0 — 2021-04-06
- 1.0.4 — 2020-04-07
- 1.0.3 — 2019-12-30
- 1.0.2 — 2019-09-11
- 1.0.1 — 2019-09-04
- 1.0.0 — 2019-09-04

## README

# rubik-telegram
Telegram's Bot API kubik for the Rubik

## Install

### npm
```bash
npm i rubik-telegram
```

### yarn
```bash
yarn add rubik-telegram
```

## Use
```js
const { App, Kubiks } = require('rubik-main');
const Telegram = require('rubik-telegram');
const path = require('path');

// create rubik app
const app = new App();
// config need for most modules
const config = new Kubiks.Config(path.join(__dirname, './config/'));

const telegram = new Telegram();

app.add([ config, telegram ]);

app.up().
then(() => console.info('App started')).
catch(err => console.error(err));
```

## Config
`telegram.js` config in configs volume may contain the host and token.

If you do not specify a host, then `https://api.telegram.org/` will be used by default.

If you don't specify a token, you will need to pass it.
```js
...
const response = await app.get('telegram').sendMessage(message, token);
...
```

You may need the host option if for some reason Telegram host is not available from your server
and you want to configure a proxy server.


For example:
`config/telegram.js`
```js
module.exports = {
  host: 'https://my.telegram.proxy.example.com/'
};
```

## Extensions
Telegram kubik doesn't has any extension.

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