2020-01-12 02:41:27 +03:00
|
|
|
import { ContextTransformer } from './'
|
2020-01-15 17:30:47 +03:00
|
|
|
import { HearsTriggers } from 'telegraf'
|
2020-02-11 21:53:28 +03:00
|
|
|
import { UpdateType, MessageSubTypes } from 'telegraf/typings/telegram-types'
|
2019-02-28 11:29:26 +03:00
|
|
|
import { Type } from '@nestjs/common'
|
|
|
|
|
|
|
|
interface ArgumentTransformation {
|
|
|
|
index: number
|
|
|
|
transform: Type<ContextTransformer>
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface HandleParameters {
|
|
|
|
onStart?: boolean
|
2020-02-11 21:53:28 +03:00
|
|
|
on?: UpdateType | UpdateType[] | MessageSubTypes | MessageSubTypes[]
|
2019-02-28 11:29:26 +03:00
|
|
|
command?: string
|
2019-05-20 07:56:11 +03:00
|
|
|
message?: string | RegExp
|
2020-01-15 17:30:47 +03:00
|
|
|
action?: HearsTriggers
|
2019-02-28 11:29:26 +03:00
|
|
|
transformations?: ArgumentTransformation[]
|
|
|
|
}
|