Open llegoelkelo opened 1 month ago
I see this line in the source code: https://github.com/robot-mafia/nestjs-telegraf/blob/a94cad7a4b7b536205cb5bfb059313bec16cbc88/lib/utils/create-bot-factory.util.ts#L15
There is a chance that if you pass the option launchOptions: false
to Factory, the bot will not launch (This is what causes this error):
import { CacheInterceptor, CacheModule, Module } from "@nestjs/common";
import { APP_INTERCEPTOR } from "@nestjs/core";
import { TelegrafModule } from "nestjs-telegraf";
@Module({
imports: [
CacheModule.register({ isGlobal: true }),
TelegrafModule.forRoot({
botName: "MY_BOT",
token: "API_KEY",
options: {
handlerTimeout: 180000,
},
+ launchOptions: false,
include: [MyModule],
}),
],
providers: [
{ provide: APP_INTERCEPTOR, useClass: CacheInterceptor },
],
})
export class AppModule {}
However, the bot will not be able to listen for events from Telegram, only manually send message or call api.
How can you use
nestjs-telegraf
if your API is running horizontally on several containers at the same time?As of now, I get the following error: