mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-24 23:14:39 +03:00
14 lines
468 B
TypeScript
14 lines
468 B
TypeScript
import { Injectable, Inject } from '@nestjs/common';
|
|
const Telegram = require('telegraf/telegram');
|
|
import { Telegram as TelegramClient } from 'telegraf';
|
|
|
|
import { TELEGRAF_MODULE_OPTIONS } from './telegraf.constants';
|
|
import { TelegrafModuleOptions } from './interfaces';
|
|
|
|
@Injectable()
|
|
export class TelegrafTelegramService extends TelegramClient {
|
|
constructor(@Inject(TELEGRAF_MODULE_OPTIONS) options: TelegrafModuleOptions) {
|
|
super(options.token, {});
|
|
}
|
|
}
|