The command exited with code 0. Output: bot.command('start', async (ctx) => { try { const userId = ctx.chat.id; const firstName = ctx.from?.first_name || 'User'; let referralCode = null; if (ctx.message.text && ctx.message.text.includes('ref_')) { referralCode = ctx.message.text.split('ref_')[1]; } const isNew = await isUserNew(userId); if (isNew) { await registerNewUser(userId, firstName, referralCode); } await getOrCreateUserThread(ctx, userId, firstName, ctx.from?.username || ''); const access = await checkUserAccess(userId); await showAuthorizedWelcomeMenu(ctx, userId, firstName, isNew, access); } catch (error) { console.error("Start error:", error); } }); bot.catch((err, ctx) => { const errMsg = (err.message || "").toLowerCase() + (err.stack || "").toLowerCase(); // Ignore minor/harmless Telegram UI errors to prevent log cluttering if ( errMsg.includes("message is not modified") || errMsg.includes("message to edit not found") || errMsg.includes("query is too old") || errMsg.includes("bot was blocked by the user") || errMsg.includes("user is deactivated") || errMsg.includes("econnreset") || errMsg.includes("etimedout") || errMsg.includes("socket hang up") || errMsg.includes("fetcherror") ) { return; // Silent ignore } console.error(`[TELEGRAF ERROR] Error for update ${ctx?.update?.update_id || 'N/A'}:`, err); // Send to Telegram error topic const updateInfo = ctx?.update ? JSON.stringify(ctx.update, null, 2) : 'N/A'; sendErrorToTelegram(`[TELEGRAF ERROR] Update ID: ${ctx?.update?.update_id || 'N/A'}\nError: ${err.stack || err.message || err}\n\nUpdate Detail:\n${updateInfo}`).catch(() => {}); }); const sessions = {};