mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-26 07:48:11 +03:00
533 B
533 B
id | title | sidebar_label | slug |
---|---|---|---|
bot-injection | Bot injection | Bot injection | /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:
import { Injectable } from '@nestjs/common';
import { InjectBot, TelegrafProvider } from 'nestjs-telegraf';
@Injectable()
export class BotSettingsService {
constructor(@InjectBot() private bot: TelegrafProvider) {}
}