!feat(): add scene support & many refactor

This commit is contained in:
Arthur
2020-12-29 22:41:06 +03:00
parent b3dc258c70
commit 8c72790226
23 changed files with 232 additions and 80 deletions

View File

@@ -1,2 +1,3 @@
export * from './update.decorator';
export * from './scene.decorator';
export * from './inject-bot.decorator';

View File

@@ -1,4 +1,4 @@
import { Inject } from '@nestjs/common';
import { TelegrafProvider } from '../../telegraf.provider';
import { Telegraf } from 'telegraf';
export const InjectBot = (): ParameterDecorator => Inject(TelegrafProvider);
export const InjectBot = (): ParameterDecorator => Inject(Telegraf);

View File

@@ -0,0 +1,8 @@
import { SetMetadata } from '@nestjs/common';
import { SCENE_METADATA } from '../../telegraf.constants';
/**
* TODO
*/
export const Scene = (id: string): ClassDecorator =>
SetMetadata(SCENE_METADATA, id);