From 6a496e833f2114840abbb5f7195292f1b249dd8b Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 5 May 2026 13:33:33 +0000 Subject: [PATCH] fix: initialize grammy bot before handling updates --- src/bot/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bot/index.js b/src/bot/index.js index 297525ab..28fde9ef 100644 --- a/src/bot/index.js +++ b/src/bot/index.js @@ -235,6 +235,14 @@ export async function initBot(config, api, tools, skills, agents) { // ── Create grammy bot ── const bot = new Bot(botToken); bot.api.config.use(autoRetry({ maxRetryAttempts: 5, maxDelaySeconds: 60 })); + + // Initialize the bot to get bot info + try { + await bot.init(); + logger.info('✓ Bot initialized'); + } catch (e) { + logger.warn('⚠ Bot init failed (webhook will still work):', e.message); + } // Register bot command menu const cmdList = [