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,23 @@
---
id: decorators
title: Decorators
sidebar_label: Decorators
slug: /api-reference/decorators
---
:::caution
The described functionality is under development, the functionality has not been tested and can be changed at any time!
:::
### Update
`@Update` class decorator, it's like NestJS [`@Controller`](https://docs.nestjs.com/controllers) decorator, but for [Telegram Bot API updates](https://core.telegram.org/bots/api#getting-updates). Reserved for future use.
```typescript {3}
import { Update, Context } from 'nestjs-telegraf';
@Update()
export class SomeBotService {
...
}
```