INNER CODE UNIT · TypeScript

handleUpdates

grammyjs/grammY · src/bot.ts:332

    private async handleUpdates(updates: Update[]) {
        // handle updates sequentially (!)
        for (const update of updates) {
            this.lastTriedUpdateId = update.update_id;
            try {
                await this.handleUpdate(update);
            } catch (err) {
                // should always be true
                if (err instanceof BotError) {
                    await this.errorHandler(err);
                } else {
                    console.error("FATAL: grammY unable to handle:", err);
                    throw err;
                }
            }
        }
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…