feat(telegraf-service): support registers middleware for provided update type in @TelegramActionHandler decorator

This commit is contained in:
Aleksandr Bukhalo
2020-02-11 21:53:28 +03:00
parent bdff44d6a1
commit 2e1e607933
4 changed files with 13 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import { ContextTransformer } from './'
import { HearsTriggers } from 'telegraf'
import { UpdateType, MessageSubTypes } from 'telegraf/typings/telegram-types'
import { Type } from '@nestjs/common'
interface ArgumentTransformation {
@@ -9,6 +10,7 @@ interface ArgumentTransformation {
export interface HandleParameters {
onStart?: boolean
on?: UpdateType | UpdateType[] | MessageSubTypes | MessageSubTypes[]
command?: string
message?: string | RegExp
action?: HearsTriggers