feat(): multiple instances support

This commit is contained in:
Alexander Bukhalo
2021-01-02 01:27:01 +03:00
parent b1a6e50f8f
commit ccb2db0106
14 changed files with 263 additions and 122 deletions

View File

@@ -1,4 +1,5 @@
import { Inject } from '@nestjs/common';
import { TELEGRAF_PROVIDER } from '../telegraf.constants';
import { getBotToken } from '../utils';
export const InjectBot = (): ParameterDecorator => Inject(TELEGRAF_PROVIDER);
export const InjectBot = (name?: string): ParameterDecorator =>
Inject(getBotToken(name));