import { Composer } from "https://deno.land/x/mtkruto@0.6.3/client/1_composer.ts";
Constructors
new
Composer(...middleware: Middleware<C>[])Type Parameters
C extends { me?: User; }
Methods
branch(): Composer<C>
predicate: (ctx: C & UpdateIntersection) => MaybePromise<boolean>,
trueHandler_: Middleware<C & UpdateIntersection>,
falseHandler_: Middleware<C & UpdateIntersection>,
callbackQuery(data: string | RegExp | (string | RegExp)[], ...middleware: Middleware<WithFilter<C, "callbackQuery:data">>[]): Composer<WithFilter<C, "callbackQuery:data">>
command(commands: , ...middleware: Middleware<WithFilter<C, "message:text">>[]): Composer<WithFilter<C, "message:text">>
| string
| RegExp
| (string | RegExp)[]
| { names: string | RegExp | (string | RegExp)[]; prefixes: string | string[]; }
filter<D extends C>(predicate: (ctx: C & UpdateIntersection) => ctx is D, ...middleware: Middleware<D>[]): Composer<D>
filter(predicate: (ctx: C & UpdateIntersection) => MaybePromise<boolean>, ...middleware: Middleware<C & UpdateIntersection>[]): Composer<C>
inlineQuery(queries: string | RegExp | (string | RegExp)[], ...middleware: Middleware<WithFilter<C, "inlineQuery">>[]): Composer<WithFilter<C, "inlineQuery">>
middleware(): MiddlewareFn<C>
on<Q extends FilterQuery>(filter: Q, ...middleware: Middleware<WithFilter<C, Q>>[]): Composer<WithFilter<C, Q> & UpdateIntersection>
use(...middleware: Middleware<C & UpdateIntersection>[]): Composer<C>