2020-01-12 15:23:19 +03:00
|
|
|
import { Injectable, Inject } from '@nestjs/common';
|
|
|
|
const Telegram = require('telegraf/telegram');
|
|
|
|
import { Telegram as TelegramClient } from 'telegraf';
|
2019-05-11 20:55:15 +03:00
|
|
|
|
2020-01-12 15:23:19 +03:00
|
|
|
import { TELEGRAF_MODULE_OPTIONS } from './telegraf.constants';
|
|
|
|
import { TelegrafModuleOptions } from './interfaces';
|
2019-05-11 20:55:15 +03:00
|
|
|
|
|
|
|
@Injectable()
|
2020-01-12 15:23:19 +03:00
|
|
|
export class TelegrafTelegramService extends TelegramClient {
|
|
|
|
constructor(@Inject(TELEGRAF_MODULE_OPTIONS) options: TelegrafModuleOptions) {
|
|
|
|
super(options.token, {});
|
2019-07-18 14:32:33 +03:00
|
|
|
}
|
2019-05-11 20:55:15 +03:00
|
|
|
}
|