Add debug logs

This commit is contained in:
2022-03-14 20:27:23 +03:00
parent c7bad506e1
commit 600d4640fe

View File

@@ -93,8 +93,6 @@ export default class BotsManager {
const webhookInfo = await bot.telegram.getWebhookInfo(); const webhookInfo = await bot.telegram.getWebhookInfo();
const previousPendingUpdateCount = this.botsPendingUpdatesCount[state.id] || 0; const previousPendingUpdateCount = this.botsPendingUpdatesCount[state.id] || 0;
console.log(state.id, previousPendingUpdateCount, webhookInfo.pending_update_count);
if (previousPendingUpdateCount !== 0 && webhookInfo.pending_update_count !== 0) { if (previousPendingUpdateCount !== 0 && webhookInfo.pending_update_count !== 0) {
this._setWebhook(bot, state); this._setWebhook(bot, state);
} }
@@ -121,7 +119,9 @@ export default class BotsManager {
} }
); );
return true; return true;
} catch (e) {} } catch (e) {
console.log(e);
}
} }
return false; return false;
} }