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