import { Composer } from "https://deno.land/x/grammy@v1.12.5/composer.ts";
This is an advanced method of grammY.
Allows you to branch between two cases for a given context object.
This method takes a predicate function that is tested once per context
object. If it returns true
, the first supplied middleware is executed.
If it returns false
, the second supplied middleware is executed. Note
that the predicate may be asynchronous, i.e. it can return a Promise of a
boolean.
Parameters
trueMiddleware: MaybeArray<Middleware<C>>
The middleware for the true
case
falseMiddleware: MaybeArray<Middleware<C>>
The middleware for the false
case