docs: add versioned docs (#1)

This commit is contained in:
2023-07-23 15:28:11 +03:00
committed by GitHub
parent 7c8d746863
commit 25bd4bb4ba
17 changed files with 1379 additions and 5683 deletions

View File

@@ -0,0 +1,28 @@
---
id: installation
title: Installation
sidebar_label: Installation
slug: /
---
```bash
$ npm i nestjs-telegraf telegraf
```
Once the installation process is complete, we can import the `TelegrafModule` into the root `AppModule`.
```typescript title="src/app.module.ts"
import { Module } from '@nestjs/common';
import { TelegrafModule } from 'nestjs-telegraf';
@Module({
imports: [
TelegrafModule.forRoot({
token: 'TELEGRAM_BOT_TOKEN',
})
],
})
export class AppModule {}
```
The `forRoot()` method accepts the same configuration object as Telegraf class constructor from the Telegraf package, as described [here](https://telegraf.js.org/#/?id=constructor).