feat!(): add custom execution context

This commit is contained in:
Morb0
2021-01-03 01:30:57 +03:00
parent 85bb916709
commit af632ea471
64 changed files with 899 additions and 69 deletions

View File

@@ -0,0 +1,7 @@
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
import { TelegrafExecutionContext } from '../../../lib/execution-context';
export const From = createParamDecorator(
(_, ctx: ExecutionContext) =>
TelegrafExecutionContext.create(ctx).getContext().from,
);