Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix: API gets stuck is TELEGRAM_BOT_TOKEN is present

Blue Mouse8beacb46b8c9
diff --git a/backend/apps/cloud/src/integrations/telegram/telegram.module.ts b/backend/apps/cloud/src/integrations/telegram/telegram.module.ts
index 33dc4f188..5d0566e65 100644
--- a/backend/apps/cloud/src/integrations/telegram/telegram.module.ts
+++ b/backend/apps/cloud/src/integrations/telegram/telegram.module.ts
@@ -60,13 +60,10 @@ export class TelegramModule implements OnModuleInit {
async onModuleInit() {
if (!this.bot) return
- try {
- await this.bot.launch({ dropPendingUpdates: false })
- this.logger.log('Telegram bot launched successfully')
- } catch (reason) {
+ this.bot.launch({ dropPendingUpdates: false }).catch((reason) => {
this.logger.warn(
`Telegram bot failed to launch: ${reason.message}. Bot features will be unavailable.`,
)
- }
+ })
}
}