docs: support docs versioning, new update hook decorators docs added

This commit is contained in:
Aleksandr Bukhalo
2020-09-10 11:23:04 +03:00
parent 7043f247da
commit df2b6a5ab3
20 changed files with 711 additions and 20 deletions

View File

@@ -0,0 +1,30 @@
---
id: installation
title: Installation
sidebar_label: Installation
slug: /
---
```bash
$ npm i nestjs-telegraf
```
Once the installation process is complete, we can import the TelegrafModule into the root AppModule.
```typescript
/* 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).