fork(...middleware) {
        const composer = new Composer(...middleware);
        const fork = flatten(composer);
        this.use((ctx, next) => Promise.all([next(), run(fork, ctx)]));
        return composer;
    }
/**
     * > This is an advanced method of grammY.
     *
     * Registers some middleware that runs concurrently to the executing
     * middleware stack.
     * ```ts
     * bot.use( ... ) // will run first
     * bot.fork( ... ) // will be started second, but run concurrently
     * bot.use( ... ) // will also be run second
     * ```
     * In the first middleware, as soon as `next`'s Promise resolves, both forks
     * have completed.
     *
     * Both the fork and the downstream middleware are awaited with
     * `Promise.all`, so you will only be to catch up to one error (the one that
     * is thrown first).
     *
     * In opposite to the other middleware methods on composer, `fork` does not
     * return simply return the composer connected to the main middleware stack.
     * Instead, it returns the created composer _of the fork_ connected to the
     * middleware stack. This allows for the following pattern.
     * ```ts
     * // Middleware will be run concurrently!
     * bot.fork().on('message', ctx => { ... })
     * ```
     *
     * @param middleware The middleware to run concurrently
     */
> This is an advanced method of grammY.
Registers some middleware that runs concurrently to the executing
middleware stack.

Both the fork and the downstream middleware are awaited with
`Promise.all`, so you will only be to catch up to one error (the one that
is thrown first).

In opposite to the other middleware methods on composer, `fork` does not
return simply return the composer connected to the main middleware stack.
Instead, it returns the created composer _of the fork_ connected to the
middleware stack. This allows for the following pattern.
```ts
Middleware will be run concurrently.

@param middleware The middleware to run concurrently
> This is an advanced method of grammY . Registers some middleware that runs concurrently to the executing middleware stack . Both the fork and the downstream middleware are awaited with ` Promise . all ` so you will only be to catch up to one error ( the one that is thrown first ) . In opposite to the other middleware methods on composer ` fork ` does not return simply return the composer connected to the main middleware stack . Instead it returns the created composer _of the fork_ connected to the middleware stack . This allows for the following pattern . ` ` ` ts Middleware will be run concurrently . @param middleware The middleware to run concurrently
fork(...middleware) {
        const composer = new Composer(...middleware);
        const fork = flatten(composer);
        this.use((ctx, next) => Promise.all([next(), run(fork, ctx)]));
        return composer;
    }
fork ( ... middleware ) { const composer = new Composer ( ... middleware ) ; const fork = flatten ( composer ) ; this . use ( ( ctx , next ) => Promise . all ( [ next ( ) , run ( fork , ctx ) ] ) ) ; return composer ; }
> This is an advanced method of grammY.
> This is an advanced method of grammY .