managarten/services/telegram-stats-bot/src/main.ts
Till-JS f29ef4aa3a feat(infra): add Telegram Stats Bot for ManaCore analytics
Adds a NestJS service that delivers Umami analytics via Telegram:

- Telegram commands: /start, /stats, /today, /week, /realtime, /users
- Scheduled reports: Daily at 9:00, Weekly on Monday at 9:00
- Umami API integration with token management
- User statistics from auth database
- Docker + CI/CD pipeline integration

Bot: @stats_mana_bot

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:39:04 +01:00

18 lines
569 B
TypeScript

import { NestFactory } from '@nestjs/core';
import { Logger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { AppModule } from './app.module';
async function bootstrap() {
const logger = new Logger('Bootstrap');
const app = await NestFactory.create(AppModule);
const configService = app.get(ConfigService);
const port = configService.get<number>('port') || 3300;
await app.listen(port);
logger.log(`Telegram Stats Bot running on port ${port}`);
logger.log(`Timezone: ${configService.get<string>('timezone')}`);
}
bootstrap();