async handleUpdate(update, webhookReplyEnvelope) {
        if (this.me === undefined) {
            throw new Error("Bot not initialized! Either call `await bot.init()`, \
or directly set the `botInfo` option in the `Bot` constructor to specify \
a known bot info object.");
        }
        debug(`Processing update ${update.update_id}`);
        // create API object
        const api = new api_js_1.Api(this.token, this.clientConfig, webhookReplyEnvelope);
        // configure it with the same transformers as bot.api
        const t = this.api.config.installedTransformers();
        if (t.length > 0)
            api.config.use(...t);
        // create context object
        const ctx = new this.ContextConstructor(update, api, this.me);
        try {
            // run middleware stack
            await (0, composer_js_1.run)(this.middleware(), ctx);
        }
        catch (err) {
            debugErr(`Error in middleware for update ${update.update_id}`);
            throw new composer_js_1.BotError(err, ctx);
        }
    }
/**
     * This is an internal method that you probably will not ever need to call.
     * It is used whenever a new update arrives from the Telegram servers that
     * your bot will handle.
     *
     * If you're writing a library on top of grammY, check out the
     * [documentation](https://grammy.dev/plugins/runner.html) of the runner
     * plugin for an example that uses this method.
     *
     * @param update An update from the Telegram Bot API
     * @param webhookReplyEnvelope An optional webhook reply envelope
     */
This is an internal method that you probably will not ever need to call.
It is used whenever a new update arrives from the Telegram servers that
your bot will handle.

If you're writing a library on top of grammY, check out the
[documentation] of the runner
plugin for an example that uses this method.

@param update An update from the Telegram Bot API
@param webhookReplyEnvelope An optional webhook reply envelope
This is an internal method that you probably will not ever need to call . It is used whenever a new update arrives from the Telegram servers that your bot will handle . If you ' re writing a library on top of grammY check out the [ documentation ] of the runner plugin for an example that uses this method . @param update An update from the Telegram Bot API @param webhookReplyEnvelope An optional webhook reply envelope
async handleUpdate(update, webhookReplyEnvelope) {
        if (this.me === undefined) {
            throw new Error("Bot not initialized! Either call `await bot.init()`, \
or directly set the `botInfo` option in the `Bot` constructor to specify \
a known bot info object.");
        }
        debug(`Processing update ${update.update_id}`);
        const api = new api_js_1.Api(this.token, this.clientConfig, webhookReplyEnvelope);
        const t = this.api.config.installedTransformers();
        if (t.length > 0)
            api.config.use(...t);
        const ctx = new this.ContextConstructor(update, api, this.me);
        try {
            await (0, composer_js_1.run)(this.middleware(), ctx);
        }
        catch (err) {
            debugErr(`Error in middleware for update ${update.update_id}`);
            throw new composer_js_1.BotError(err, ctx);
        }
    }
async handleUpdate ( update , webhookReplyEnvelope ) { if ( this . me === undefined ) { throw new Error ( "Bot not initialized! Either call `await bot.init()`, \
or directly set the `botInfo` option in the `Bot` constructor to specify \
a known bot info object." ) ; } debug ( ` ${ update . update_id } ` ) ; const api = new api_js_1 . Api ( this . token , this . clientConfig , webhookReplyEnvelope ) ; const t = this . api . config . installedTransformers ( ) ; if ( t . length > 0 ) api . config . use ( ... t ) ; const ctx = new this . ContextConstructor ( update , api , this . me ) ; try { await ( 0 , composer_js_1 . run ) ( this . middleware ( ) , ctx ) ; } catch ( err ) { debugErr ( ` ${ update . update_id } ` ) ; throw new composer_js_1 . BotError ( err , ctx ) ; } }
This is an internal method that you probably will not ever need to call.
This is an internal method that you probably will not ever need to call .
// create API object // configure it with the same transformers as bot.api // create context object // run middleware stack