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,17 @@
---
id: bot-injection
title: Bot injection
sidebar_label: Bot injection
slug: /bot-injection
---
At times you may need to access the native `Telegraf` instance. For example, you may want to connect stage middleware. You can inject the Telegraf by using the `@InjectBot()` decorator as follows:
```typescript
import { Injectable } from '@nestjs/common';
import { InjectBot, TelegrafProvider } from 'nestjs-telegraf';
@Injectable()
export class BotSettingsService {
constructor(@InjectBot() private bot: TelegrafProvider) {}
}
```