import { Module } from '@nestjs/common'; import { telegramConfig } from './telegram-config'; import { TELEGRAM_CONFIG, TelegramClient } from './telegram-client'; /** * The Bot API client for the worker's Telegram loops. Reads the token from * the environment once; without it the client reports isConfigured() false * and the loops do not run. */ @Module({ providers: [ { provide: TELEGRAM_CONFIG, useFactory: () => telegramConfig() }, TelegramClient, ], exports: [TelegramClient], }) export class TelegramModule {}