mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-25 23:44:39 +03:00
14 lines
327 B
Markdown
14 lines
327 B
Markdown
---
|
|
id: middlewares
|
|
title: Middlewares
|
|
sidebar_label: Middlewares
|
|
slug: /middlewares
|
|
---
|
|
|
|
`nestjs-telegraf` has support of the Telegraf middleware packages. To use an existing middleware package, simply import it and add it to the middlewares array:
|
|
```typescript
|
|
TelegrafModule.forRoot({
|
|
middlewares: [session()],
|
|
}),
|
|
```
|